deploy: exec: do not remove leading spaces

This commit is contained in:
Sean Buckley 2023-03-23 17:20:24 -04:00
parent 6a47d36303
commit 84b4c53db8

View file

@ -143,7 +143,7 @@ def rexec(hosts, cmd):
hostwidth = max(map(len, hosts)) hostwidth = max(map(len, hosts))
for host in hosts: for host in hosts:
r = run(["ssh", host, "--"] + cmd, stdout=PIPE, stderr=STDOUT) r = run(["ssh", host, "--"] + cmd, stdout=PIPE, stderr=STDOUT)
lines = r.stdout.decode("utf8").strip().splitlines() lines = r.stdout.decode("utf8").strip("\n").splitlines()
print(host.rjust(hostwidth), end=" ") print(host.rjust(hostwidth), end=" ")
print(icon_bad if r.returncode else icon_good, end=" ") print(icon_bad if r.returncode else icon_good, end=" ")
if len(lines) == 1: if len(lines) == 1: