[Git][NTPsec/ntpsec][master] updated regex for SmartCtl class to be more specific.

deamoneye gitlab at mg.gitlab.com
Mon Jan 23 01:09:28 UTC 2017


deamoneye pushed to branch master at NTPsec / ntpsec


Commits:
dc4e6175 by Keane Wolter at 2017-01-22T20:09:16-05:00
updated regex for SmartCtl class to be more specific.

- - - - -


1 changed file:

- contrib/temp-log.py


Changes:

=====================================
contrib/temp-log.py
=====================================
--- a/contrib/temp-log.py
+++ b/contrib/temp-log.py
@@ -63,8 +63,8 @@ class SmartCtl:
         for child in os.listdir('/dev/'):
             if re.compile('sd[a-z]$').match(child):
                 self._drives.append("/dev/"+str(child))
-        # this regex matches temperature output lines from smartctl -a
-        self._pat = re.compile('194 Temperature_Celsius\s+\S+\s+(\d+)\s+')
+        # this regex matches temperature output lines from smartctl -l
+        self._pat = re.compile('194 Temperature_Celsius\s+\S+\s+\d+\s+\d+\s+\d+\s+\S+\s+\S+\s+\S+\s+(\d+)')
 
     def get_data(self):
         "Collects the data and return the output as an array"



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/dc4e61753cd40d3772a8725d4d1a2319919b36a0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170123/cfd90dac/attachment.html>


More information about the vc mailing list