Skip to content

Commit

Permalink
Merge 4ed37f2 into 836aaed
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaclarke committed Aug 19, 2021
2 parents 836aaed + 4ed37f2 commit d80eb4d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions conbench/machine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,12 @@ def _lscpu(info):
if not missing:
return

command = ["lscpu", "--bytes"]
result = subprocess.run(command, capture_output=True)
if result.returncode != 0:
try:
command = ["lscpu", "--bytes"]
result = subprocess.run(command, capture_output=True)
if result.returncode != 0:
return
except:
return

parts = result.stdout.decode("utf-8").strip().split("\n")
Expand All @@ -186,9 +189,12 @@ def _meminfo(info):
if not missing:
return

command = ["cat", "/proc/meminfo"]
result = subprocess.run(command, capture_output=True)
if result.returncode != 0:
try:
command = ["cat", "/proc/meminfo"]
result = subprocess.run(command, capture_output=True)
if result.returncode != 0:
return
except:
return

parts = result.stdout.decode("utf-8").strip().split("\n")
Expand Down

0 comments on commit d80eb4d

Please sign in to comment.