Skip to content
Snippets Groups Projects
Commit 0a23a439 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[helpers] Fix key search in dictionaries

parent 217e79dd
Branches
Tags
2 merge requests!17Merge development branch 1.5.x,!10Py3 compatibility
...@@ -62,7 +62,7 @@ def convert_experiment_configuration_to_container(config): ...@@ -62,7 +62,7 @@ def convert_experiment_configuration_to_container(config):
data['range'] = config['range'] data['range'] = config['range']
data['inputs'] = \ data['inputs'] = \
dict([(k, { 'channel': v['channel'], 'path': v['path'], 'database': v.has_key('database') }) for k,v in config['inputs'].items()]) dict([(k, { 'channel': v['channel'], 'path': v['path'], 'database': 'database' in v }) for k,v in config['inputs'].items()])
if 'outputs' in config: if 'outputs' in config:
data['outputs'] = \ data['outputs'] = \
...@@ -181,7 +181,7 @@ def create_inputs_from_configuration(config, algorithm, prefix, cache_root, ...@@ -181,7 +181,7 @@ def create_inputs_from_configuration(config, algorithm, prefix, cache_root,
# Create of retrieve the database view # Create of retrieve the database view
channel = details['channel'] channel = details['channel']
if not views.has_key(channel): if channel not in views:
view = db.view(details['protocol'], details['set']) view = db.view(details['protocol'], details['set'])
view.setup(os.path.join(cache_root, details['path']), pack=False, view.setup(os.path.join(cache_root, details['path']), pack=False,
start_index=start_index, end_index=end_index) start_index=start_index, end_index=end_index)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment