]> arthur.barton.de Git - netdata.git/blobdiff - plugins.d/python.d.plugin
hipchat: simplify server definition
[netdata.git] / plugins.d / python.d.plugin
index 44b729094ce307189f3fcecbdfc32464c37d1b60..4fdfae34725fb18d0f715ac07c8065fa877cd4ee 100755 (executable)
@@ -73,10 +73,16 @@ try:
     DICT = OrderedDict
     msg.info('YAML output is ordered')
 except ImportError:
-    ORDERED = False
-    DICT = dict
-    msg.info('YAML output is unordered')
-else:
+    try:
+        from ordereddict import OrderedDict
+        ORDERED = True
+        DICT = OrderedDict
+        msg.info('YAML output is ordered')
+    except ImportError:
+        ORDERED = False
+        DICT = dict
+        msg.info('YAML output is unordered')
+if ORDERED:
     def ordered_load(stream, Loader=yaml.Loader, object_pairs_hook=OrderedDict):
         class OrderedLoader(Loader):
             pass
@@ -500,7 +506,7 @@ def run():
     global DEBUG_FLAG, TRACE_FLAG, BASE_CONFIG
 
     # read configuration file
-    disabled = []
+    disabled = ['nginx_log', 'gunicorn_log']
     configfile = CONFIG_DIR + "python.d.conf"
     msg.PROGRAM = PROGRAM
     msg.info("reading configuration file:", configfile)