Commit 588e5cef authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fix bug: Retrieval of providers without retriever causes exception

parent 2a28e3c3
...@@ -93,12 +93,16 @@ def load_uncached_entries(dbxrefs): ...@@ -93,12 +93,16 @@ def load_uncached_entries(dbxrefs):
if config.has_provider(key): if config.has_provider(key):
provider = config.get_provider(key) provider = config.get_provider(key)
logger.debug('{0} is supported'.format(key)) logger.debug('{0} is supported'.format(key))
if provider['retriever']['type'] == 'external': if 'retriever' in provider:
results.extend( load_with_external_provider(provider, list(dbxrefs))) if provider['retriever']['type'] == 'external':
elif provider['retriever']['type'] == 'internal': results.extend( load_with_external_provider(provider, list(dbxrefs)))
results.extend(load_with_internal_provider(provider, list(dbxrefs))) elif provider['retriever']['type'] == 'internal':
results.extend(load_with_internal_provider(provider, list(dbxrefs)))
else:
raise Exception('Unknown retriever type', provider['retriever']['type'])
else: else:
raise Exception('Unknown retriever type', provider['retriever']['type']) logger.debug('{0} is not supported'.format(key))
results.extend( map(lambda x: {'id': toString(x), 'status': 'not supported'}, dbxrefs))
else: else:
logger.debug('{0} is not supported'.format(key)) logger.debug('{0} is not supported'.format(key))
results.extend( map(lambda x: {'id': toString(x), 'status': 'not supported'}, dbxrefs)) results.extend( map(lambda x: {'id': toString(x), 'status': 'not supported'}, dbxrefs))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment