exception decorator and mail send for errors and changes to rec state checker

This commit is contained in:
2019-11-14 14:15:36 +01:00
parent 6081486a35
commit e19ce060d8
12 changed files with 305 additions and 136 deletions

View File

@@ -0,0 +1,13 @@
from backend import LrcException
def exception_decorator(*exceptions):
def decorator(func):
def new_func(*args, **kwargs):
try:
ret = func(*args, **kwargs)
return ret
except exceptions as e:
raise LrcException(e)
return new_func
return decorator