]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Expand '~' in ssh key paths
authorZack Cerza <zack.cerza@inktank.com>
Fri, 1 Aug 2014 20:24:45 +0000 (14:24 -0600)
committerZack Cerza <zack.cerza@inktank.com>
Fri, 1 Aug 2014 20:27:59 +0000 (14:27 -0600)
... since paramiko doesn't bother to do this

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/orchestra/connection.py

index c1f51a7e0ee97e438d5b4f224631e48c089a9b60..a97eebd3a2ab84be790a6d54be3cd2af3f555b9b 100644 (file)
@@ -88,7 +88,10 @@ def connect(user_at_host, host_key=None, keep_alive=False,
         }
         for opt_name, arg_name in opts_to_args.items():
             if opt_name in opts:
-                connect_args[arg_name] = opts[opt_name]
+                value = opts[opt_name]
+                if arg_name == 'key_filename' and '~' in value:
+                    value = os.path.expanduser(value)
+                connect_args[arg_name] = value
 
     log.info(connect_args)