]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Pass up unmodified exceptions from connection.connect()
authorDan Mick <dan.mick@inktank.com>
Wed, 6 Jun 2012 01:41:45 +0000 (18:41 -0700)
committerDan Mick <dan.mick@inktank.com>
Wed, 6 Jun 2012 01:41:45 +0000 (18:41 -0700)
This allows useful errors to be reported from things like
mismatched hostkeys, etc.

teuthology/orchestra/connection.py

index 353565c6da7d0e0d08bf979337244cd956364ca7..c769411db67516fdb3ba25bf1bf7af85c53cce12 100644 (file)
@@ -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