From e2a1fb51201f22b2315843b684665245ee35e171 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 14 Sep 2017 17:31:57 +0200 Subject: rumba: Add better error handling of SSH connect If an SSH connect doesn't succeed at first, it is retried up to 5 times with an exponential backoff. It also adds an error message in case of an offending host key. --- rumba/prototypes/enroll.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rumba/prototypes/enroll.py') diff --git a/rumba/prototypes/enroll.py b/rumba/prototypes/enroll.py index 774ba52..35cc136 100755 --- a/rumba/prototypes/enroll.py +++ b/rumba/prototypes/enroll.py @@ -28,6 +28,7 @@ import argparse import socket import time import re +import sys def printalo(byt): print(repr(byt).replace('\\n', '\n')) @@ -133,5 +134,6 @@ if connected: else: print('Failed to connect to "%s"' % socket_name) + sys.exit(-1) s.close() -- cgit v1.2.3