Hi, I noticed the following after trying to pass GetCommandOutput() an
argument in list form. From qa_utils.py:
def GetSSHCommand(node, cmd, strict=True):
"""Builds SSH command to be executed.
Args:
- node: Node the command should run on
- cmd: Command to be executed as a list with all parameters
[...]
"""
args = [ 'ssh', '-oEscapeChar=none', '-oBatchMode=yes', '-l', 'root', '-t' ]
[...]
args.append(node)
args.append(cmd)
return args
As can be seen, "cmd" is not treated as a list, but as a string
(otherwise, args.extend would have been used). Indeed, all invocations
to GetCommandOutput pass directly a string.
Should I just update the docstring above?
--
Adeodato Simo | [email protected]
Corp Computing Services SRE (Dublin)