From: Dan Mick Date: Wed, 6 Jun 2012 01:41:45 +0000 (-0700) Subject: Pass up unmodified exceptions from connection.connect() X-Git-Tag: 1.1.0~2551 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=120ce3f8a780c1604849b6afbb46c93d9563aa8e;p=teuthology.git Pass up unmodified exceptions from connection.connect() This allows useful errors to be reported from things like mismatched hostkeys, etc. --- diff --git a/teuthology/orchestra/connection.py b/teuthology/orchestra/connection.py index 353565c6d..c769411db 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