add sleep

This commit is contained in:
2023-09-19 22:14:33 +02:00
parent e964f74f58
commit 43b50a4efb

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import time
import paramiko import paramiko
import threading import threading
import yaml import yaml
@@ -27,6 +28,7 @@ def update_keys(host, port, user, keys):
client.close() client.close()
print('' + user + '@' + host) print('' + user + '@' + host)
except Exception: except Exception:
time.sleep(1)
print('' + user + '@' + host) print('' + user + '@' + host)
def main(): def main():
@@ -56,6 +58,7 @@ def main():
thread = task_thread(host['host'], host['port'], user_name, host_keys) thread = task_thread(host['host'], host['port'], user_name, host_keys)
thread.start() thread.start()
except: except:
time.sleep(1)
print('' + user_name + '@' + host['host']) print('' + user_name + '@' + host['host'])
if __name__ == '__main__': if __name__ == '__main__':