mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-22 00:02:28 +00:00
--amend
This commit is contained in:
parent
14a3e4103b
commit
56fef9e835
@ -134,7 +134,12 @@ class Senpy(object):
|
|||||||
self.plugins[plugin_name].is_activated = active
|
self.plugins[plugin_name].is_activated = active
|
||||||
|
|
||||||
def activate_plugin(self, plugin_name, sync=False):
|
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))
|
logger.info("Activating plugin: {}".format(plugin.name))
|
||||||
def act():
|
def act():
|
||||||
try:
|
try:
|
||||||
@ -152,7 +157,11 @@ class Senpy(object):
|
|||||||
return th
|
return th
|
||||||
|
|
||||||
def deactivate_plugin(self, plugin_name, sync=False):
|
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():
|
def deact():
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user