MCPcopy Create free account
hub / github.com/StackStorm/st2 / _register_plugin_path

Function _register_plugin_path

st2common/st2common/util/loader.py:44–53  ·  view source on GitHub ↗
(plugin_dir_abs_path)

Source from the content-addressed store, hash-verified

42
43
44def _register_plugin_path(plugin_dir_abs_path):
45 if not os.path.isdir(plugin_dir_abs_path):
46 raise Exception(
47 'Directory "%s" with plugins doesn\'t exist' % (plugin_dir_abs_path)
48 )
49
50 for x in sys.path:
51 if plugin_dir_abs_path in (x, x + os.sep):
52 return
53 sys.path.append(plugin_dir_abs_path)
54
55
56def _get_plugin_module(plugin_file_path):

Callers 2

register_plugin_classFunction · 0.85
register_pluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected