Fix #26 [NEPI] [BUG] SSH identity doesn't expand '~'
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 13 Feb 2014 11:17:25 +0000 (12:17 +0100)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 13 Feb 2014 11:17:25 +0000 (12:17 +0100)
src/nepi/util/sshfuncs.py

index 2853941..1df46b9 100644 (file)
@@ -266,6 +266,7 @@ def rexec(command, host, user,
         args.append('-p%d' % port)
 
     if identity:
+        identity = os.path.expanduser(identity)
         args.extend(('-i', identity))
 
     if tty:
@@ -398,6 +399,7 @@ def rcopy(source, dest,
         args.append('-r')
 
     if identity:
+        identity = os.path.expanduser(identity)
         args.extend(('-i', identity))
 
     if server_key: