pylint disable broad excepts when it make sense.

This commit is contained in:
Romain Dorgueil
2016-12-26 14:04:29 +01:00
parent 20397bcfef
commit 0dafd08a75

View File

@ -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()