]> arthur.barton.de Git - netdata.git/commitdiff
minor fixes
authorpaulfantom <paulfantom@gmail.com>
Wed, 13 Jul 2016 16:51:24 +0000 (18:51 +0200)
committerpaulfantom <paulfantom@gmail.com>
Wed, 13 Jul 2016 16:51:24 +0000 (18:51 +0200)
plugins.d/python.d.plugin
python.d/python_modules/base.py

index 8b3ba4bfbb337ecfd40270f7a7b853c2bd9c0b13..6d34f73ffcb0ce84fa823ec0254ec3b76d0e31fa 100755 (executable)
@@ -485,7 +485,6 @@ def run():
     # parse passed command line arguments
     modules = parse_cmdline(MODULES_DIR, *sys.argv)
     msg.DEBUG_FLAG = DEBUG_FLAG
-    modules = ['sensors']
     msg.info("MODULES_DIR='" + MODULES_DIR +
              "', CONFIG_DIR='" + CONFIG_DIR +
              "', UPDATE_EVERY=" + str(BASE_CONFIG['update_every']) +
index c10d795c9e4e764c87ec53afbf5f766a77fd2af0..26e825c3d4da57c9ddcf7bf55afe736a6afe7542 100644 (file)
@@ -207,8 +207,6 @@ class BaseService(threading.Thread):
         p = self._format(type_id, name, title, units, family, category, charttype, priority, update_every)
         self._line("CHART", *p)
 
-
-
     def dimension(self, id, name=None, algorithm="absolute", multiplier=1, divisor=1, hidden=False):
         """
         Defines a new dimension for the chart
@@ -235,7 +233,7 @@ class BaseService(threading.Thread):
         if algorithm not in ("absolute", "incremental", "percentage-of-absolute-row", "percentage-of-incremental-row"):
             algorithm = "absolute"
 
-        self._dimensions.append(id)
+        self._dimensions.append(str(id))
         if hidden:
             p = self._format(id, name, algorithm, multiplier, divisor, "hidden")
             #self._line("DIMENSION", id, name, algorithm, str(multiplier), str(divisor), "hidden")
@@ -272,7 +270,7 @@ class BaseService(threading.Thread):
         :return: boolean
         """
         if id not in self._dimensions:
-            self.error("wrong dimension id:", id)
+            self.error("wrong dimension id:", id, "Available dimensions are:", *self._dimensions)
             return False
         try:
             value = str(int(value))