if error occures on main thread - simplify error logging
This commit is contained in:
parent
c7dbeb2078
commit
256a180bd6
@ -345,6 +345,11 @@ def process_error(log_info: str, name: str, exc_info: tuple, citizen=None, commi
|
||||
trace = inspect.trace()
|
||||
if trace:
|
||||
trace = trace[-1][0].f_locals
|
||||
if trace.get('__name__') == '__main__':
|
||||
trace = {'commit_id': trace.get('COMMIT_ID'),
|
||||
'interactive': trace.get('INTERACTIVE'),
|
||||
'version': trace.get('__version__'),
|
||||
'config': trace.get('CONFIG')}
|
||||
else:
|
||||
trace = dict()
|
||||
send_email(name, content, citizen, local_vars=trace)
|
||||
|
Loading…
x
Reference in New Issue
Block a user