Skip to content

Commit

Permalink
Compact read temperature exception
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonghi committed Jan 9, 2024
1 parent 4234fbc commit 0b1302b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jtop/core/temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ def read_temperature(data):
try:
value = float(cat(path)) / 1000.0
values[name] = value
except OSError:
except (OSError, ValueError):
# If negative sensor offline
values[name] = TEMPERATURE_OFFLINE
except ValueError:
values[name] = TEMPERATURE_OFFLINE
return values


Expand Down

0 comments on commit 0b1302b

Please sign in to comment.