Commit 56fef9e8 authored by J. Fernando Sánchez's avatar J. Fernando Sánchez
Browse files

--amend

parent 14a3e410
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment