1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-12-22 13:08:13 +00:00
This commit is contained in:
J. Fernando Sánchez 2016-02-21 03:00:11 +01:00
parent 14a3e4103b
commit 56fef9e835

View File

@ -134,7 +134,12 @@ class Senpy(object):
self.plugins[plugin_name].is_activated = active
def activate_plugin(self, plugin_name, sync=False):
plugin = self.plugins[plugin_name]
try:
plugin = self.plugins[plugin_name]
except KeyError:
raise Error(message="Plugin not found: {}".format(plugin_name),
status=404)
logger.info("Activating plugin: {}".format(plugin.name))
def act():
try:
@ -152,7 +157,11 @@ class Senpy(object):
return th
def deactivate_plugin(self, plugin_name, sync=False):
plugin = self.plugins[plugin_name]
try:
plugin = self.plugins[plugin_name]
except KeyError:
raise Error(message="Plugin not found: {}".format(plugin_name),
status=404)
def deact():
try: