fail CPU usage test if can't get usage for a process

old-commit-hash: b89d10c086
This commit is contained in:
Adeeb Shihadeh
2020-06-23 16:11:01 -07:00
parent 0d04c2cc26
commit e8bc334d22
+1
View File
@@ -44,6 +44,7 @@ def print_cpu_usage(first_proc, last_proc):
print(f"{proc_name.ljust(35)} {cpu_usage:.2f}%")
except IndexError:
print(f"{proc_name.ljust(35)} NO METRICS FOUND")
r = 1
print("------------------------------------------------")
return r