MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / load_plugin

Function load_plugin

keepercommander/plugins/plugin_manager.py:48–64  ·  view source on GitHub ↗

Load plugin based on name

(module_name)

Source from the content-addressed store, hash-verified

46
47
48def load_plugin(module_name):
49 """Load plugin based on name"""
50 if module_name == 'noop':
51 return noop
52
53 if module_name not in imported_plugins:
54 full_name = 'keepercommander.plugins.' + module_name
55 try:
56 logging.debug('Importing %s', str(full_name))
57 imported_plugins[module_name] = importlib.import_module(full_name)
58 except ModuleNotFoundError as e:
59 logging.error('The required module is not installed:\n\tpip install %s', e.name)
60
61 if module_name in imported_plugins:
62 return imported_plugins[module_name]
63 else:
64 return ''
65
66
67def get_host_field_dict(record):

Callers 1

get_pluginFunction · 0.85

Calls 2

debugMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected