catch addon exc with bare traceback

This commit is contained in:
əlemi 2022-04-26 23:23:33 +02:00
parent 91afbbc28a
commit a3aacd6291
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -8,6 +8,7 @@ import inspect
from pathlib import Path from pathlib import Path
from importlib import import_module from importlib import import_module
import traceback
from typing import List, Type, Set, get_type_hints from typing import List, Type, Set, get_type_hints
from dataclasses import dataclass, MISSING, fields from dataclasses import dataclass, MISSING, fields
@ -32,7 +33,8 @@ def main():
if obj != Addon and inspect.isclass(obj) and issubclass(obj, Addon): if obj != Addon and inspect.isclass(obj) and issubclass(obj, Addon):
addons.add(obj) addons.add(obj)
except Exception as e: 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 pass
help_text = '\n\naddons (enabled via config file):' help_text = '\n\naddons (enabled via config file):'