Skip to content

Commit 6ca23f7

Browse files
committed
replace NotImplemented with NotImplementedError, remove return from finally block (ops)
1 parent 48ba92d commit 6ca23f7

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

python.d/python_modules/bases/FrameworkServices/SimpleService.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,4 @@ def get_data(self):
232232
return self._get_data()
233233

234234
def _get_data(self):
235-
raise NotImplemented
235+
raise NotImplementedError

python.d/python_modules/bases/collection.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,11 @@ def wrapper(*args, **kwargs):
3434
try:
3535
func(*args, **kwargs)
3636
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:])
4039
finally:
41-
if not finally_func:
42-
return
43-
finally_func(*on_finally[1:])
40+
if finally_func:
41+
finally_func(*on_finally[1:])
4442
return wrapper
4543
return decorator
4644

0 commit comments

Comments
 (0)