Commit 55cbe291 authored by Samuel GAIST's avatar Samuel GAIST

[algorithms] Fix key search in dictionaries

parent 61b56e81
......@@ -264,13 +264,13 @@ def execute(prefix, cache, instructions_file):
configuration['queue'] = 'unused'
configuration['nb_slots'] = 1
if not configuration.has_key('parameters'):
if 'parameters' not in configuration:
configuration['parameters'] = {}
for name, cfg in configuration['inputs'].items():
cfg['endpoint'] = name
suffix = ''
if cfg.has_key('database'): # Connected to a database output
if 'database' in cfg: # Connected to a database output
cfg['hash'] = hash.hashDataset(cfg['database'], cfg['protocol'], cfg['set'])
suffix = '.db'
......@@ -278,7 +278,7 @@ def execute(prefix, cache, instructions_file):
algo = AlgorithmStorage(prefix, configuration['algorithm'])
if configuration.has_key('outputs'): # Standard algorithm
if 'outputs' in configuration: # Standard algorithm
for name, cfg in configuration['outputs'].items():
cfg['endpoint'] = name
cfg['hash'] = hash.hashBlockOutput(
......@@ -326,7 +326,7 @@ def execute(prefix, cache, instructions_file):
print(result['stderr'])
# Display the results
if configuration.has_key('outputs'): # Standard algorithm
if 'outputs' in configuration: # Standard algorithm
print('Outputs of the algorithms available at:')
for name, cfg in configuration['outputs'].items():
print(' - %s: %s' % (name, cfg['path']))
......
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