Commit 0c009cc5 authored by Michael Hanselmann's avatar Michael Hanselmann

listrunner: Don't pass arguments if there are none

If no arguments were specified the “exec_args” variable was “None”,
leading to the command being run as “… ./… None”.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 9dc45ab1
......@@ -376,8 +376,10 @@ def HostWorker(logdir, username, password, use_agent, hostname,
print " %s: uploading files" % hostname
upload_dir = UploadFiles(connection, executable,
filelist, logfile)
command = ("cd %s && ./%s %s" %
(upload_dir, os.path.basename(executable), exec_args))
command = ("cd %s && ./%s" %
(upload_dir, os.path.basename(executable)))
if exec_args:
command += " %s" % exec_args
print " %s: executing remote command" % hostname
cmd_result = RunRemoteCommand(connection, command, logfile)
if cmd_result is True:
......
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