mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-06 20:11:37 +00:00
Error handling in plugin helpers
This commit is contained in:
@@ -202,9 +202,12 @@ def get_modules(pkg, path=None):
|
|||||||
return [v for k, v in context.items()]
|
return [v for k, v in context.items()]
|
||||||
|
|
||||||
|
|
||||||
def get_classes(module):
|
def get_classes(module) -> list:
|
||||||
"""Get all classes in a given module."""
|
"""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):
|
def get_plugins(pkg, baseclass, path=None):
|
||||||
|
Reference in New Issue
Block a user