2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 03:55:41 +00:00

More logging

This commit is contained in:
Oliver Walters
2024-11-17 12:23:37 +00:00
parent ade4a46c86
commit 7e2619dee1

View File

@ -214,10 +214,11 @@ def get_modules(pkg, path=None):
def get_classes(module) -> list:
"""Get all classes in a given module."""
# try:
return inspect.getmembers(module, inspect.isclass)
# except Exception:
# return []
try:
return inspect.getmembers(module, inspect.isclass)
except Exception:
log_error({module.__name__: 'Could not get classes'}, 'discovery')
return []
def get_plugins(pkg, baseclass, path=None):