From 43b50a4efbda6f18b6eb9ff25d7449c5a17002ca Mon Sep 17 00:00:00 2001 From: Toby Date: Tue, 19 Sep 2023 22:14:33 +0200 Subject: [PATCH] add sleep --- sync.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sync.py b/sync.py index f3f65ec..56d1986 100755 --- a/sync.py +++ b/sync.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import time import paramiko import threading import yaml @@ -27,6 +28,7 @@ def update_keys(host, port, user, keys): client.close() print('✅ ' + user + '@' + host) except Exception: + time.sleep(1) print('❌ ' + user + '@' + host) def main(): @@ -56,6 +58,7 @@ def main(): thread = task_thread(host['host'], host['port'], user_name, host_keys) thread.start() except: + time.sleep(1) print('❌ ' + user_name + '@' + host['host']) if __name__ == '__main__':