On Sun, Jan 09, 2011 at 03:58:23PM +0000, Adeodato Simo wrote: > 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?
Hah, "Args:"? This must be some very old code⦠Yes, please update the docstring. thanks, iustin
