]> arthur.barton.de Git - netdata.git/commitdiff
hddtemp check raw data
authorpaulfantom <paulfantom@gmail.com>
Tue, 19 Jul 2016 01:18:28 +0000 (03:18 +0200)
committerpaulfantom <paulfantom@gmail.com>
Tue, 19 Jul 2016 01:18:28 +0000 (03:18 +0200)
python.d/hddtemp.chart.py

index e5fa660b0e8186aaf837f6415e315f9a901e5ab1..1beae67a4ec9f3ab3787b987c547902ee74c32ee 100644 (file)
@@ -39,6 +39,15 @@ class Service(SocketService):
         self.order = ORDER
         self.definitions = CHARTS
 
+    def _check_raw_data(self, data):
+        if not data.endswith('|'):
+            return False
+
+        if data.count('|') % 5 == 0:
+            return True
+
+        return False
+
     def _get_data(self):
         """
         Get data from TCP/IP socket