do not fail on plugin import
This commit is contained in:
parent
c4ae80c4a2
commit
75bb8a11bd
@ -63,14 +63,16 @@ def enable(name, onionr = None, start_event = True):
|
|||||||
if exists(name):
|
if exists(name):
|
||||||
enabled_plugins = get_enabled_plugins()
|
enabled_plugins = get_enabled_plugins()
|
||||||
if not name in enabled_plugins:
|
if not name in enabled_plugins:
|
||||||
|
try:
|
||||||
|
events.call(get_plugin(name), 'enable', onionr)
|
||||||
|
except ImportError: # Was getting import error on Gitlab CI test "data"
|
||||||
|
return False
|
||||||
|
else:
|
||||||
enabled_plugins.append(name)
|
enabled_plugins.append(name)
|
||||||
config.set('plugins.enabled', enabled_plugins, True)
|
config.set('plugins.enabled', enabled_plugins, True)
|
||||||
|
|
||||||
events.call(get_plugin(name), 'enable', onionr)
|
|
||||||
|
|
||||||
if start_event is True:
|
if start_event is True:
|
||||||
start(name)
|
start(name)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user