python 2 compat

This commit is contained in:
Edwin Eefting 2021-05-09 11:09:55 +02:00
parent 086cfe570b
commit c682665888
2 changed files with 2 additions and 2 deletions

@ -43,7 +43,7 @@ class CmdPipe:
ret = ret + "(" + " ".join(item['cmd']) + ")"
else:
#make it copy-pastable, will make a mess of quotes sometimes, but is correct
ret = ret + "(" + shlex.join(item['cmd']) + ")"
ret = ret + "(" + " ".join(map(shlex.quote,item['cmd'])) + ")"
return ret

@ -62,7 +62,7 @@ class ExecuteNode(LogStub):
ret.append(self.ssh_to)
ret.append(shlex.join(cmd))
ret.append(" ".join(map(shlex.quote, cmd)))
return ret