Unverified Commit dc96fd54 authored by Kero Liang's avatar Kero Liang Committed by GitHub
Browse files

[Misc] Avoid stripping meaningful whitespace from `nvidia-smi topo -m` output...


[Misc] Avoid stripping meaningful whitespace from `nvidia-smi topo -m` output in collect_env.py (#16272)
Signed-off-by: default avatarimkero <kerorek@outlook.com>
parent 1f5d13ab
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment