[enh] add "inactive" attribute to engines

This modification allows us to deactivate engines in settings.yml
without commenting them out
This commit is contained in:
Adam Tauber 2017-07-19 21:30:18 +02:00
parent 80331cc8e6
commit 1794f6a4d3
1 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,8 @@ def load_engine(engine_data):
logger.debug('Starting background initialization of %s engine', engine_data['name'])
threading.Thread(target=engine_init).start()
continue
if engine_attr == 'inactive' and getattr(engine, engine_attr) is True:
return None
if getattr(engine, engine_attr) is None:
logger.error('Missing engine config attribute: "{0}.{1}"'
.format(engine.name, engine_attr))