Filter virtualenv lines from stackprinter dump
This commit is contained in:
parent
3e2293195a
commit
64c3e3066b
@ -75,7 +75,11 @@ def log_uncaught_exceptions(_ex_cls, ex, tb):
|
||||
print("\033[1;31;47m")
|
||||
logging.critical("".join(traceback.format_tb(tb)))
|
||||
print("\033[1;37;40m")
|
||||
print(stackprinter.format(ex, style="darkbg"))
|
||||
print(
|
||||
stackprinter.format(
|
||||
ex, suppressed_paths=["/pypoetry/virtualenvs/"], style="darkbg"
|
||||
)
|
||||
)
|
||||
if os.environ["MM_ENV"] == "PRODUCTION":
|
||||
msg = stackprinter.format(ex)
|
||||
send_mail(
|
||||
|
||||
@ -2180,5 +2180,9 @@ if __name__ == "__main__":
|
||||
)
|
||||
else:
|
||||
print("\033[1;31;47mUnhandled exception starts")
|
||||
print(stackprinter.format(exc, style="darkbg"))
|
||||
print(
|
||||
stackprinter.format(
|
||||
exc, suppressed_paths=["/pypoetry/virtualenvs/"], style="darkbg"
|
||||
)
|
||||
)
|
||||
print("Unhandled exception ends\033[1;37;40m")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user