From 56646db5b57e4acf27384747f130c6ead2979de2 Mon Sep 17 00:00:00 2001 From: sebthom Date: Wed, 16 Feb 2022 21:58:51 +0100 Subject: [PATCH] automatically print stacktrace on TypeError --- kleinanzeigen_bot/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kleinanzeigen_bot/utils.py b/kleinanzeigen_bot/utils.py index ba30f06..e46bcf4 100644 --- a/kleinanzeigen_bot/utils.py +++ b/kleinanzeigen_bot/utils.py @@ -108,7 +108,7 @@ def on_exception(ex_type, ex_value, ex_traceback) -> None: if issubclass(ex_type, KeyboardInterrupt): sys.__excepthook__(ex_type, ex_value, ex_traceback) return - if LOG.isEnabledFor(logging.DEBUG) or isinstance(ex_value, (AttributeError, ImportError, NameError)): + if LOG.isEnabledFor(logging.DEBUG) or isinstance(ex_value, (AttributeError, ImportError, NameError, TypeError)): LOG.error("".join(traceback.format_exception(ex_type, ex_value, ex_traceback))) elif isinstance(ex_value, AssertionError): LOG.error(ex_value)