MCPcopy
hub / github.com/apache/caldera / enable

Method enable

app/objects/c_plugin.py:62–70  ·  view source on GitHub ↗
(self, services)

Source from the content-addressed store, hash-verified

60 return False
61
62 async def enable(self, services):
63 try:
64 if os.path.exists('plugins/%s/data' % self.name.lower()):
65 self.data_dir = 'plugins/%s/data' % self.name.lower()
66 plugin = self._load_module().enable
67 await plugin(services)
68 self.enabled = True
69 except Exception as e:
70 logging.error('Error enabling plugin=%s, %s' % (self.name, e))
71
72 async def destroy(self, services):
73 if self.enabled:

Callers 1

loadMethod · 0.95

Calls 1

_load_moduleMethod · 0.95

Tested by

no test coverage detected