[Misc] Avoid stripping meaningful whitespace from nvidia-smi topo -m
output in collect_env.py (#16272)
Signed-off-by: imkero <kerorek@outlook.com>
This commit is contained in:
parent
1f5d13ab9f
commit
dc96fd54c6
@ -105,8 +105,14 @@ def run(command):
|
||||
else:
|
||||
enc = locale.getpreferredencoding()
|
||||
output = raw_output.decode(enc)
|
||||
if command == 'nvidia-smi topo -m':
|
||||
# don't remove the leading whitespace of `nvidia-smi topo -m`
|
||||
# because they are meaningful
|
||||
output = output.rstrip()
|
||||
else:
|
||||
output = output.strip()
|
||||
err = raw_err.decode(enc)
|
||||
return rc, output.strip(), err.strip()
|
||||
return rc, output, err.strip()
|
||||
|
||||
|
||||
def run_and_read_all(run_lambda, command):
|
||||
|
Loading…
x
Reference in New Issue
Block a user