[qa] covers __main__, and formating.

This commit is contained in:
Romain Dorgueil
2017-05-22 20:06:26 +02:00
parent a50b21e46d
commit 1dccad883d
7 changed files with 34 additions and 26 deletions

View File

@ -8,6 +8,7 @@ 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:
@ -15,6 +16,7 @@ def recoverable(error_handler):
except Exception as exc: # pylint: disable=broad-except
error_handler(exc, traceback.format_exc())
@contextmanager
def unrecoverable(error_handler):
try:
@ -23,6 +25,7 @@ def unrecoverable(error_handler):
error_handler(exc, traceback.format_exc())
raise # raise unrecoverableerror from x ?
class LoopingExecutionContext(Wrapper):
alive = True
PERIOD = 0.25