Commit 6cea04c2 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[databases] Added exception handling to view indexing

This allows to not crash the tool when a problem arise
parent c2e331ab
......@@ -420,8 +420,15 @@ def index_outputs(configuration, names, uid=None, db_root=None, docker=False):
continue
dataset_hash = hashDataset(db_name, protocol_name, set_name)
view.index(os.path.join(configuration.cache,
toPath(dataset_hash, '.db')))
try:
view.index(os.path.join(configuration.cache,
toPath(dataset_hash, '.db')))
except RuntimeError as error:
logger.error("Failed to load the database `%s':",
database_name)
logger.error(' * Runtime error %s', error)
retcode += 1
continue
else:
databases_container = \
......
Markdown is supported
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