mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-19 06:27:49 +00:00
Error handling in plugin helpers
This commit is contained in:
1 parent
ae06fbb000
commit
3e1fd1b1f4
1 file changed
+5
-2
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user