(plugin_name: str)
| 76 | |
| 77 | |
| 78 | async def get_core_plugin_definition(plugin_name: str): |
| 79 | try: |
| 80 | print("plugin_name:", plugin_name) |
| 81 | return getattr( __import__(plugin_name + "." + plugin_name, fromlist=["Plugin"]), "Plugin") |
| 82 | except AttributeError: |
| 83 | raise fastapi.HTTPException(status_code=404, detail="Plugin definition could not be generated") |
| 84 | except KeyError as err: |
| 85 | print(err) |
| 86 | raise fastapi.HTTPException(status_code=500, detail="Error in plugin definition") |
| 87 | except ModuleNotFoundError: |
| 88 | raise fastapi.HTTPException(status_code=404, detail="Plugin does not exist") |
no outgoing calls
no test coverage detected