MCPcopy
hub / github.com/WebODM/WebODM / enable_plugin

Function enable_plugin

app/plugins/functions.py:330–339  ·  view source on GitHub ↗
(plugin_name)

Source from the content-addressed store, hash-verified

328 return handleRequest
329
330def enable_plugin(plugin_name):
331 p = get_plugin_by_name(plugin_name, only_active=False)
332 p.register()
333 try:
334 p.enable()
335 except Exception as e:
336 logger.warning(f"Plugin: {plugin_name} enable error: {str(e)}")
337 raise # Propagate error to UI
338 Plugin.objects.get(pk=plugin_name).enable()
339 return p
340
341def disable_plugin(plugin_name):
342 p = get_plugin_by_name(plugin_name, only_active=False)

Callers 4

plugin_enableMethod · 0.90
test_core_pluginsMethod · 0.90
test_plugin_datastoreMethod · 0.90
test_toggle_pluginsMethod · 0.90

Calls 4

get_plugin_by_nameFunction · 0.85
registerMethod · 0.45
enableMethod · 0.45
getMethod · 0.45

Tested by 3

test_core_pluginsMethod · 0.72
test_plugin_datastoreMethod · 0.72
test_toggle_pluginsMethod · 0.72