From 120ce3f8a780c1604849b6afbb46c93d9563aa8e Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Tue, 5 Jun 2012 18:41:45 -0700 Subject: [PATCH] Pass up unmodified exceptions from connection.connect() This allows useful errors to be reported from things like mismatched hostkeys, etc. --- teuthology/orchestra/connection.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/teuthology/orchestra/connection.py b/teuthology/orchestra/connection.py index 353565c6da7d0..c769411db6751 100644 --- a/teuthology/orchestra/connection.py +++ b/teuthology/orchestra/connection.py @@ -37,13 +37,11 @@ def connect(user_at_host, host_key=None, keep_alive=False, key=_create_key(keytype, key) ) - try: - ssh.connect( - hostname=host, - username=user, - timeout=60, - ) - except: - raise ValueError('failed connect to %s@%s' % (user, host)) + # just let the exceptions bubble up to caller + ssh.connect( + hostname=host, + username=user, + timeout=60, + ) ssh.get_transport().set_keepalive(keep_alive) return ssh -- 2.39.5