smell: removes global catches, even if it may help in such critical places.
This commit is contained in:
@ -67,7 +67,7 @@ class ConfigurableMeta(type):
|
||||
|
||||
try:
|
||||
import _functools
|
||||
except:
|
||||
except Exception:
|
||||
import functools
|
||||
|
||||
PartiallyConfigured = functools.partial
|
||||
|
||||
@ -133,7 +133,7 @@ class ContextCurrifier:
|
||||
try:
|
||||
# todo yield from ? how to ?
|
||||
processor.send(self._stack_values.pop())
|
||||
except StopIteration as exc:
|
||||
except StopIteration:
|
||||
# This is normal, and wanted.
|
||||
pass
|
||||
else:
|
||||
|
||||
@ -160,7 +160,7 @@ class NodeExecutionContext(BaseContext, WithStatistics):
|
||||
if self._stack:
|
||||
try:
|
||||
self._stack.teardown()
|
||||
except:
|
||||
except Exception:
|
||||
self.fatal(sys.exc_info())
|
||||
|
||||
super().stop()
|
||||
|
||||
@ -29,7 +29,7 @@ class ExecutorStrategy(Strategy):
|
||||
with self.create_executor(graph) as executor:
|
||||
try:
|
||||
context.start(self.get_starter(executor, futures))
|
||||
except:
|
||||
except Exception:
|
||||
logger.critical('Exception caught while starting execution context.', exc_info=sys.exc_info())
|
||||
|
||||
while context.alive:
|
||||
@ -53,14 +53,14 @@ class ExecutorStrategy(Strategy):
|
||||
try:
|
||||
with node:
|
||||
node.loop()
|
||||
except:
|
||||
except Exception:
|
||||
logging.getLogger(__name__).critical(
|
||||
'Critical error in threadpool node starter.', exc_info=sys.exc_info()
|
||||
)
|
||||
|
||||
try:
|
||||
futures.append(executor.submit(_runner))
|
||||
except:
|
||||
except Exception:
|
||||
logging.getLogger(__name__).critical('futures.append', exc_info=sys.exc_info())
|
||||
|
||||
return starter
|
||||
|
||||
Reference in New Issue
Block a user