Commit fb80e410 authored by Justin's avatar Justin

promise/plugin: Fixed check_cpu_temperature.py to avoid errors when sensors not available

parent 4f1ebb44
......@@ -28,7 +28,9 @@ class RunPromise(JSONPromise):
try:
cpu_temp = psutil.sensors_temperatures()['coretemp'][0][1]
except (KeyError, IndexError) as e:
self.logger.error("Could not read core temperature")
# Put logger.info to avoid errors when sensors are not
# supported by OS (ex: VM)
self.logger.info("Could not read core temperature on VM")
return
# Check spot temperature
......
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