From 12612c1e5ada8b2ee7bf963c0dd50830619f9126 Mon Sep 17 00:00:00 2001 From: Facetoe Date: Thu, 16 Feb 2017 20:20:25 +0800 Subject: [PATCH] Fix bug where sensors reports no maximum. --- i3pystatus/temp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/temp.py b/i3pystatus/temp.py index c68dad3..4d15e2c 100644 --- a/i3pystatus/temp.py +++ b/i3pystatus/temp.py @@ -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):