Support for both enabled and disabled flags on plugin level
This commit is contained in:
parent
0a81b43f1d
commit
27e4ea5b5b
1 changed files with 10 additions and 0 deletions
|
@ -93,6 +93,16 @@ def get_plugin(plugin_name, reload=False):
|
|||
plugin_conf = Config.get_plugins()[plugin_name] \
|
||||
if plugin_name in Config.get_plugins() else {}
|
||||
|
||||
if 'disabled' in plugin_conf:
|
||||
if plugin_conf['disabled'] is True:
|
||||
return None
|
||||
del plugin_conf['disabled']
|
||||
|
||||
if 'enabled' in plugin_conf:
|
||||
if plugin_conf['enabled'] is False:
|
||||
return None
|
||||
del plugin_conf['enabled']
|
||||
|
||||
try:
|
||||
plugin_class = getattr(plugin, cls_name)
|
||||
except AttributeError as e:
|
||||
|
|
Loading…
Reference in a new issue