]> arthur.barton.de Git - netdata.git/commitdiff
I added test to establish if sensor value is a number.
authorpaulfantom <paulfantom@gmail.com>
Wed, 13 Jul 2016 15:41:22 +0000 (17:41 +0200)
committerpaulfantom <paulfantom@gmail.com>
Wed, 13 Jul 2016 15:41:22 +0000 (17:41 +0200)
should fix #682

python.d/sensors.chart.py

index edfe125dbd94babefafc1570f566eab55bc3b088..4345228e44531d0861530776326b46da051d776e 100644 (file)
@@ -83,6 +83,10 @@ class Service(SimpleService):
                 if len(self.chips) != 0 and not any([ex.startswith(pref) for ex in self.chips]):
                     continue
                 for feature in chip:
+                    try:
+                        float(feature.get_value())
+                    except ValueError:
+                        continue
                     if feature.get_value() == 0:
                         continue
                     if sensors.TYPE_DICT[feature.type] == type: