diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-01 22:44:28 +0200 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-01 22:44:28 +0200 |
| commit | e2ab08d50aab5c2cc4a92cdbee0e1325da470ddf (patch) | |
| tree | 3f089f1964d04b29403ccf1c62e67eeec87985bb /scripts | |
| parent | ed98d3ca2bdb2e4989de4fc9fdbea08274734d7b (diff) | |
| download | psutil-e2ab08d50aab5c2cc4a92cdbee0e1325da470ddf.tar.gz | |
fix different tests on openbsd
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/fans.py | 3 | ||||
| -rwxr-xr-x | scripts/sensors.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/fans.py b/scripts/fans.py index e302aec5..7a0ccf91 100755 --- a/scripts/fans.py +++ b/scripts/fans.py @@ -23,7 +23,8 @@ def main(): return sys.exit("platform not supported") fans = psutil.sensors_fans() if not fans: - return sys.exit("no fans detected") + print("no fans detected") + return for name, entries in fans.items(): print(name) for entry in entries: diff --git a/scripts/sensors.py b/scripts/sensors.py index e3301ebf..bbf3ac90 100755 --- a/scripts/sensors.py +++ b/scripts/sensors.py @@ -30,7 +30,6 @@ Battery: """ from __future__ import print_function -import sys import psutil @@ -56,7 +55,8 @@ def main(): battery = None if not any((temps, fans, battery)): - return sys.exit("can't read any temperature, fans or battery info") + print("can't read any temperature, fans or battery info") + return names = set(list(temps.keys()) + list(fans.keys())) for name in names: |
