Commit 96f4d71d by Csók Tamás

client: more string modification

parent 9334dd45
......@@ -26,8 +26,13 @@ def connect(vm):
vm.password -- Password used for the connection
"""
if vm.protocol == "SSH":
command = ("sshpass -p %s ssh -p %s" % (vm.password, vm.port)
" -o StrictHostKeyChecking=no %s@%s" % (vm.user, vm.host))
command = ("sshpass -p %(password)s ssh -p %(port)s"
" -o StrictHostKeyChecking=no %(user)s@%(host)s" % {
'password': vm.password,
'port': vm.port,
'user': vm.user,
'host': vm.host
})
subprocess.call(command, shell=True)
elif vm.protocol in ("NX", "RDP"):
server = "%s:%s" % (vm.host, vm.port)
......
......@@ -26,8 +26,13 @@ def connect(vm):
vm.password -- Password used for the connection
"""
if vm.protocol == "SSH":
command = ("sshpass -p %s ssh -p %s" % (vm.password, vm.port)
" -o StrictHostKeyChecking=no %s@%s" % (vm.user, vm.host))
command = ("sshpass -p %(password)s ssh -p %(port)s"
" -o StrictHostKeyChecking=no %(user)s@%(host)s" % {
'password': vm.password,
'port': vm.port,
'user': vm.user,
'host': vm.host
})
subprocess.call(command, shell=True)
elif vm.protocol in ("NX", "RDP"):
server = "%s:%s" % (vm.host, vm.port)
......
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