From 3440d664e7a53b5ea9d4bb46d265fbb807a86760 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 1 Aug 2014 14:24:45 -0600 Subject: [PATCH] Expand '~' in ssh key paths ... since paramiko doesn't bother to do this Signed-off-by: Zack Cerza --- teuthology/orchestra/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/teuthology/orchestra/connection.py b/teuthology/orchestra/connection.py index c1f51a7e0ee97..a97eebd3a2ab8 100644 --- a/teuthology/orchestra/connection.py +++ b/teuthology/orchestra/connection.py @@ -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) -- 2.39.5