Commit 86a6cbe9 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[algorithm] Fix dataformat loading

Currently the loops where skipped because of the way
optional group content where handled.
parent c723f155
......@@ -494,38 +494,34 @@ class Algorithm(object):
self.dataformats[input["type"]] = thisformat
if "outputs" not in group:
continue
for name, output in group["outputs"].items():
if output["type"] in self.dataformats:
continue
if dataformat_cache and output["type"] in dataformat_cache: # reuse
thisformat = dataformat_cache[output["type"]]
else: # load it
thisformat = dataformat.DataFormat(self.prefix, output["type"])
if dataformat_cache is not None: # update it
dataformat_cache[output["type"]] = thisformat
if "outputs" in group:
for name, output in group["outputs"].items():
if output["type"] in self.dataformats:
continue
self.dataformats[output["type"]] = thisformat
if dataformat_cache and output["type"] in dataformat_cache: # reuse
thisformat = dataformat_cache[output["type"]]
else: # load it
thisformat = dataformat.DataFormat(self.prefix, output["type"])
if dataformat_cache is not None: # update it
dataformat_cache[output["type"]] = thisformat
if "loop" not in group:
continue
self.dataformats[output["type"]] = thisformat
for name, entry in group["loop"].items():
entry_format = entry["type"]
if entry_format in self.dataformats:
continue
if "loop" in group:
for name, entry in group["loop"].items():
entry_format = entry["type"]
if entry_format in self.dataformats:
continue
if dataformat_cache and entry_format in dataformat_cache:
thisformat = dataformat_cache[entry_format]
else:
thisformat = dataformat.DataFormat(self.prefix, entry_format)
if dataformat_cache is not None:
dataformat_cache[entry_format] = thisformat
if dataformat_cache and entry_format in dataformat_cache:
thisformat = dataformat_cache[entry_format]
else:
thisformat = dataformat.DataFormat(self.prefix, entry_format)
if dataformat_cache is not None:
dataformat_cache[entry_format] = thisformat
self.dataformats[entry_format] = thisformat
self.dataformats[entry_format] = thisformat
if self.results:
......
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