MCPcopy Index your code
hub / github.com/WebODM/WebODM / init_plugins

Function init_plugins

app/plugins/functions.py:28–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 sys.path.append(settings.MEDIA_ROOT)
27
28def init_plugins():
29 # Make sure app/media/plugins exists
30 if not os.path.exists(get_plugins_persistent_path()):
31 os.mkdir(get_plugins_persistent_path())
32
33 # Make sure app/media/plugins is importable as a module
34 if not os.path.isfile(os.path.join(get_plugins_persistent_path(), "__init__.py")):
35 try:
36 with open(os.path.join(get_plugins_persistent_path(), "__init__.py"), 'w') as f:
37 f.write("\n")
38 except Exception as e:
39 logger.warning("Cannot create __init__.py: %s" % str(e))
40
41 build_plugins()
42 sync_plugin_db()
43 register_plugins()
44
45def sync_plugin_db():
46 """

Callers 2

plugin_uploadMethod · 0.90
bootFunction · 0.90

Calls 6

build_pluginsFunction · 0.85
sync_plugin_dbFunction · 0.85
register_pluginsFunction · 0.85
existsMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected