Commit 088e890b by Csók Tamás

client: corrected an extreme case of enviroment variable handling

parent 7b6856ad
...@@ -29,9 +29,16 @@ def connect(vm): ...@@ -29,9 +29,16 @@ def connect(vm):
vm.password -- Password used for the connection vm.password -- Password used for the connection
""" """
if vm.protocol == "SSH": if vm.protocol == "SSH":
arguments = ("-ssh -P %s -pw %s" % (vm.port, vm.password) arguments = ("-ssh -P %(port)s -pw %(password)s"
+ " %s@%s" % (vm.user, vm.host)) " %(user)s@%(host)s" % {
subprocess.Popen("putty.exe "+arguments, shell=True) 'port': vm.port,
'password': vm.password,
'user': vm.user,
'host': vm.host})
directory = os.path.dirname(os.path.abspath(__file__))
subprocess.Popen("%(path)s\\putty.exe %(arguments)s" % {
'path': directory,
'arguments': arguments}, shell=True)
elif vm.protocol == "NX": elif vm.protocol == "NX":
listdir = os.path.expanduser("~\\.nx\\config\\*.nxs") listdir = os.path.expanduser("~\\.nx\\config\\*.nxs")
found = False found = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment