do not fail on plugin import
parent
c4ae80c4a2
commit
75bb8a11bd
|
@ -63,15 +63,17 @@ 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:
|
||||||
enabled_plugins.append(name)
|
try:
|
||||||
config.set('plugins.enabled', enabled_plugins, True)
|
events.call(get_plugin(name), 'enable', onionr)
|
||||||
|
except ImportError: # Was getting import error on Gitlab CI test "data"
|
||||||
events.call(get_plugin(name), 'enable', onionr)
|
return False
|
||||||
|
else:
|
||||||
if start_event is True:
|
enabled_plugins.append(name)
|
||||||
start(name)
|
config.set('plugins.enabled', enabled_plugins, True)
|
||||||
|
|
||||||
return True
|
if start_event is True:
|
||||||
|
start(name)
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue