2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 19:45:46 +00:00

Error handling in plugin helpers

This commit is contained in:
Oliver Walters
2024-11-17 00:04:59 +00:00
parent ae06fbb000
commit 3e1fd1b1f4

View File

@ -202,9 +202,12 @@ def get_modules(pkg, path=None):
return [v for k, v in context.items()]
def get_classes(module):
def get_classes(module) -> list:
"""Get all classes in a given module."""
return inspect.getmembers(module, inspect.isclass)
try:
return inspect.getmembers(module, inspect.isclass)
except Exception:
return []
def get_plugins(pkg, baseclass, path=None):