]> arthur.barton.de Git - netdata.git/commitdiff
Merge pull request #888 from rsanger/fix_hddtemp
authorPaweł Krupa <paulfantom@gmail.com>
Sun, 25 Sep 2016 08:59:23 +0000 (10:59 +0200)
committerGitHub <noreply@github.com>
Sun, 25 Sep 2016 08:59:23 +0000 (10:59 +0200)
Fix issues when using a manually configured list of drives in the hddtemp python module

python.d/hddtemp.chart.py

index 4271001b70daad705e1c00adbeb474adf3764e61..465bfdfa22aa08d3489b644c374c404a20da1ae9 100644 (file)
@@ -44,7 +44,7 @@ class Service(SocketService):
     def _get_disks(self):
         try:
             disks = self.configuration['devices']
-            print(disks)
+            self.info("Using configured disks" + str(disks))
         except (KeyError, TypeError) as e:
             self.info("Autodetecting disks")
             return ["/dev/" + f for f in os.listdir("/dev") if len(f) == 3 and f.startswith("sd")]
@@ -53,8 +53,7 @@ class Service(SocketService):
         for disk in disks:
             if not disk.startswith('/dev/'):
                 disk = "/dev/" + disk
-            if os.path.exists(disk):
-                ret.append(disk)
+            ret.append(disk)
         if len(ret) == 0:
             self.error("Provided disks cannot be found in /dev directory.")
         return ret