[qa] attempt to fix #58.

This commit is contained in:
Romain Dorgueil
2017-05-22 19:17:34 +02:00
parent 54d2f73b35
commit cf21c0e088
2 changed files with 11 additions and 15 deletions

View File

@ -8,6 +8,12 @@ from bonobo.plugins import get_enhancers
from bonobo.util.errors import print_error
from bonobo.util.objects import Wrapper, get_name
@contextmanager
def recoverable(error_handler):
try:
yield
except Exception as exc: # pylint: disable=broad-except
error_handler(exc, traceback.format_exc())
@contextmanager
def unrecoverable(error_handler):
@ -17,7 +23,6 @@ def unrecoverable(error_handler):
error_handler(exc, traceback.format_exc())
raise # raise unrecoverableerror from x ?
class LoopingExecutionContext(Wrapper):
alive = True
PERIOD = 0.25