Commit 0a80a26f authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Return first parameter of console command only once

Reviewed-by: iustinp
parent 3f752d97
......@@ -3160,8 +3160,7 @@ class LUConnectConsole(NoHooksLU):
console_cmd = hyper.GetShellCommandForConsole(instance)
# build ssh cmdline
cmd = self.ssh.BuildCmd(node, "root", console_cmd, batch=True, tty=True)
return cmd[0], cmd
return self.ssh.BuildCmd(node, "root", console_cmd, batch=True, tty=True)
class LUReplaceDisks(LogicalUnit):
......@@ -505,11 +505,11 @@ def ConnectToInstanceConsole(opts, args):
instance_name = args[0]
op = opcodes.OpConnectConsole(instance_name=instance_name)
cmd, argv = SubmitOpCode(op)
cmd = SubmitOpCode(op)
# drop lock and exec so other commands can run while we have console
os.execvp(cmd, argv)
os.execvp(cmd[0], cmd)
sys.stderr.write("Can't run console command %s with arguments:\n'%s'" %
(cmd, " ".join(argv)))
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 to comment