@cryptotaxi247 / netdata-1 / commits / 01dc89f2d

respect global variables in module file

lgz committed Oct 22, 2017 at 22:49 UTC 01dc89f2d1aa9a3cba3b56b8fb57d627d6fc07a1
1 file changed +2 -3
plugins.d/python.d.plugin
+2 -3
@@ -133,8 +133,7 @@ class Module(object):
133 def __nonzero__(self):
134 return self.__bool__()
135
136 - @staticmethod
137 - def jobs_configurations_builder(config):
136 + def jobs_configurations_builder(self, config):
137 """
138 :param config: <dict>
139 :return:
@@ -143,7 +142,7 @@ class Module(object):
142 job_base_config = dict()
143
144 for attr in BASE_CONFIG:
146 - job_base_config[attr] = config.pop(attr, BASE_CONFIG[attr])
145 + job_base_config[attr] = config.pop(attr, getattr(self.service, attr, BASE_CONFIG[attr]))
146
147 if not config:
148 config = {str(): dict()}