Fix bug where sensors reports no maximum.

This commit is contained in:
Facetoe 2017-02-16 20:20:25 +08:00
parent 82555cb6a7
commit 12612c1e5a

View File

@ -11,7 +11,7 @@ class Sensor:
def __init__(self, name, current, maximum, critical):
self.name = name.replace(' ', '_')
self.current = int(current)
self.maximum = int(maximum)
self.maximum = int(maximum) if maximum else int(critical)
self.critical = int(critical)
def __repr__(self):