@cryptotaxi247 / netdata-1 / commits / 6ca23f773

replace NotImplemented with NotImplementedError, remove return from finally block (ops)

lgz committed Oct 13, 2017 at 01:55 UTC 6ca23f773f5293570d4701b66ad8599254ceacbf
2 files changed +5 -7
python.d/python_modules/bases/FrameworkServices/SimpleService.py
+1 -1
@@ -232,4 +232,4 @@ class SimpleService(Thread, PythonDLimitedLogger, OldVersionCompatibility, objec
232 return self._get_data()
233
234 def _get_data(self):
235 - raise NotImplemented
235 + raise NotImplementedError
python.d/python_modules/bases/collection.py
+4 -6
@@ -34,13 +34,11 @@ def on_try_except_finally(on_except=(None, ), on_finally=(None, )):
34 try:
35 func(*args, **kwargs)
36 except Exception:
37 - if not except_func:
38 - return
39 - except_func(*on_except[1:])
37 + if except_func:
38 + except_func(*on_except[1:])
39 finally:
41 - if not finally_func:
42 - return
43 - finally_func(*on_finally[1:])
40 + if finally_func:
41 + finally_func(*on_finally[1:])
42 return wrapper
43 return decorator
44