From a3aacd629196e6af01f57e18af8fed40a8e962e5 Mon Sep 17 00:00:00 2001 From: alemidev Date: Tue, 26 Apr 2022 23:23:33 +0200 Subject: [PATCH] catch addon exc with bare traceback --- src/treepuncher/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/treepuncher/__main__.py b/src/treepuncher/__main__.py index 0c3b3cc..a96c891 100644 --- a/src/treepuncher/__main__.py +++ b/src/treepuncher/__main__.py @@ -8,6 +8,7 @@ import inspect from pathlib import Path from importlib import import_module +import traceback from typing import List, Type, Set, get_type_hints from dataclasses import dataclass, MISSING, fields @@ -32,7 +33,8 @@ def main(): if obj != Addon and inspect.isclass(obj) and issubclass(obj, Addon): addons.add(obj) except Exception as e: - # logging.debug("Error importing module %s : %s", py_path, str(e)) # TODO if we log anything here we get everything logged twice? + print(f"Exception importing addon {py_path}") + traceback.print_exc() pass help_text = '\n\naddons (enabled via config file):'