summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-02-06 14:33:19 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2017-02-06 14:33:19 +0100
commit99bf6e2d01cb948f1f87346c43935d26913f4b7b (patch)
tree7916f28a80d9e6dda2d31ff8ccd5e9cc7c1cdf6e /scripts
parentba2fdbd15f43bf2f82458d39310edd0bc2c57588 (diff)
downloadpsutil-99bf6e2d01cb948f1f87346c43935d26913f4b7b.tar.gz
fix various failures occurring on CentOS
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/temperatures.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/temperatures.py b/scripts/temperatures.py
index 4b14180e..15b9156b 100755
--- a/scripts/temperatures.py
+++ b/scripts/temperatures.py
@@ -33,6 +33,8 @@ def main():
if not hasattr(psutil, "sensors_temperatures"):
sys.exit("platform not supported")
temps = psutil.sensors_temperatures()
+ if not temps:
+ sys.exit("can't read any temperature")
for name, entries in temps.items():
print(name)
for entry in entries: