@cryptotaxi247 / netdata-1 / commits / 6896783f2

remove unused imports from "example"

lgz committed Oct 13, 2017 at 20:05 UTC 6896783f2d9a32de1e9c4cb0a126de9c15adbd87
2 files changed +2 -5
python.d/example.chart.py
-3
@@ -2,11 +2,8 @@
2 # Description: example netdata python.d module
3 # Author: Pawel Krupa (paulfantom)
4
5 -import os
5 import random
6
8 -from collections import defaultdict
9 -
7 from bases.FrameworkServices.SimpleService import SimpleService
8
9 # default module values
python.d/python_modules/bases/charts.py
+2 -2
@@ -106,7 +106,7 @@ class Chart:
106 """
107 :param params: <list>
108 """
109 - if not params or not isinstance(params, list):
109 + if not (params and isinstance(params, list)):
110 raise ValueError('Chart params must be a not empty list')
111
112 self.params = dict(zip(CHART_PARAMS, (p or str() for p in params)))
@@ -181,7 +181,7 @@ class Dimension:
181 """
182 :param params: <list>
183 """
184 - if not params or not isinstance(params, list):
184 + if not (params and isinstance(params, list)):
185 raise ValueError('Dimension params must be a not empty list')
186
187 self.params = dict(zip(DIMENSION_PARAMS, (p or str() for p in params)))