forked from M-Labs/artiq
1
0
Fork 0

worker: do not print redundant exception information

This commit is contained in:
Sebastien Bourdeauducq 2016-02-25 01:10:31 +08:00
parent 950eaef08c
commit 251aed047f
1 changed files with 1 additions and 1 deletions

View File

@ -257,9 +257,9 @@ def main():
if exc_str: if exc_str:
short_exc_info += ": " + exc_str short_exc_info += ": " + exc_str
lines = ["Terminating with exception ("+short_exc_info+")\n"] lines = ["Terminating with exception ("+short_exc_info+")\n"]
lines += traceback.format_exception_only(type(exc), exc)
if hasattr(exc, "parent_traceback"): if hasattr(exc, "parent_traceback"):
lines += exc.parent_traceback lines += exc.parent_traceback
lines += traceback.format_exception_only(type(exc), exc)
logging.error("".join(lines).rstrip(), logging.error("".join(lines).rstrip(),
exc_info=not hasattr(exc, "parent_traceback")) exc_info=not hasattr(exc, "parent_traceback"))
put_object({"action": "exception"}) put_object({"action": "exception"})