pylint disable broad excepts when it make sense.
This commit is contained in:
@ -67,10 +67,7 @@ class PluginExecutionContext:
|
|||||||
self.handle_error(exc, traceback.format_exc())
|
self.handle_error(exc, traceback.format_exc())
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
self.initialize()
|
||||||
get_initializer(self.plugin)(self)
|
|
||||||
except Exception as exc:
|
|
||||||
print('error in initializer', type(exc), exc)
|
|
||||||
|
|
||||||
while self.alive:
|
while self.alive:
|
||||||
# todo with wrap_errors ....
|
# todo with wrap_errors ....
|
||||||
@ -82,10 +79,7 @@ class PluginExecutionContext:
|
|||||||
|
|
||||||
sleep(0.25)
|
sleep(0.25)
|
||||||
|
|
||||||
try:
|
self.finalize()
|
||||||
get_finalizer(self.plugin)(self)
|
|
||||||
except Exception as exc:
|
|
||||||
print('error in finalizer', type(exc), exc)
|
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
self.alive = False
|
self.alive = False
|
||||||
@ -251,7 +245,7 @@ class ComponentExecutionContext(WithStatistics):
|
|||||||
break # BREAK !!!
|
break # BREAK !!!
|
||||||
except Empty:
|
except Empty:
|
||||||
continue
|
continue
|
||||||
except Exception as exc:
|
except Exception as exc: # pylint: disable=broad-except
|
||||||
self.handle_error(exc, traceback.format_exc())
|
self.handle_error(exc, traceback.format_exc())
|
||||||
|
|
||||||
self.finalize()
|
self.finalize()
|
||||||
|
|||||||
Reference in New Issue
Block a user