Commit e5f00600 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[execution][base] Fix key search in dictionaries

parent 8ecfa4aa
......@@ -187,14 +187,14 @@ class BaseExecutor(object):
if len(self.data['inputs']) != len(self.algorithm.input_map):
self.errors.append("The number of inputs of the algorithm doesn't correspond")
if self.data.has_key('outputs') and (len(self.data['outputs']) != len(self.algorithm.output_map)):
if 'outputs' in self.data and (len(self.data['outputs']) != len(self.algorithm.output_map)):
self.errors.append("The number of outputs of the algorithm doesn't correspond")
for name in self.data['inputs'].keys():
if name not in self.algorithm.input_map.keys():
self.errors.append("The input '%s' doesn't exist in the algorithm" % name)
if self.data.has_key('outputs'):
if 'outputs' in self.data:
for name in self.data['outputs'].keys():
if name not in self.algorithm.output_map.keys():
self.errors.append("The output '%s' doesn't exist in the algorithm" % name)
......
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