diff --git a/CEP/Pipeline/recipes/sip/bin/genericpipeline.py b/CEP/Pipeline/recipes/sip/bin/genericpipeline.py index feca430e942a10c0aaa23028487cc99deeccb23f..2528dcadcc4b2e3e13f7e0a56e12084ff93fc9d7 100755 --- a/CEP/Pipeline/recipes/sip/bin/genericpipeline.py +++ b/CEP/Pipeline/recipes/sip/bin/genericpipeline.py @@ -287,17 +287,20 @@ class GenericPipeline(control): val = subpipeline_parset[k] if not str(k).startswith('!') and not str(k).startswith('pipeline.replace.'): for item in checklist: - if item in str(val): + if item+".output" in str(val): val = str(val).replace(item, stepname + '-' + item) self.parset.add(stepname + '-' + k, str(val)) else: + # remove replacements strings to prevent loading the same key twice + if k in self._keys(self.parset): + self.parset.remove(k) self.parset.add(k, str(val)) for i, item in enumerate(subpipeline_steplist): subpipeline_steplist[i] = stepname + '-' + item for item in step_parset_obj[stepname].keys(): for k in self._keys(self.parset): - if str(k).startswith('!') and item in k or str(k).startswith('pipeline.replace.') and item in k: + if str(k).startswith('!') and item == str(k).strip("! ") or str(k).startswith('pipeline.replace.') and item == str(k)[17:].strip(): self.parset.remove(k) self.parset.add('! ' + item, str(step_parset_obj[stepname][item])) self._replace_values() @@ -308,10 +311,6 @@ class GenericPipeline(control): step_control_dict[name] = step_control_dict[j] step_name_list.insert(0, name) - # remove replacements strings to prevent loading the same key twice - for k in copy.deepcopy(self.parset.keywords()): - if str(k).startswith('!'): - self.parset.remove(k) # loop if kind_of_step == 'loop':