From b64a05a93c82d8bceb8b02ed4808413610a2a012 Mon Sep 17 00:00:00 2001 From: Stefan Froehlich <s.froehlich@fz-juelich.de> Date: Tue, 26 Jul 2016 08:49:38 +0000 Subject: [PATCH] Task #9709: Added environment variable expansion in string replacement feature of the generic pipeline. --- CEP/Pipeline/recipes/sip/bin/genericpipeline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CEP/Pipeline/recipes/sip/bin/genericpipeline.py b/CEP/Pipeline/recipes/sip/bin/genericpipeline.py index c094d6d2cd0..5ac1f058b54 100755 --- a/CEP/Pipeline/recipes/sip/bin/genericpipeline.py +++ b/CEP/Pipeline/recipes/sip/bin/genericpipeline.py @@ -519,8 +519,10 @@ class GenericPipeline(control): replacedict[str(check).lstrip('!').lstrip(' ')] = str(self.parset[check]) if str(check).startswith('pipeline.replace.'): replacedict[str(check).replace('pipeline.replace.', '').lstrip(' ')] = str(self.parset[check]) - #self.logger.info( 'REPLACEDICT: ') - #self.logger.info(replacedict) + #expand environment variables + for k, v in replacedict.items(): + replacedict[k] = os.path.expandvars(v) + for check in self._keys(self.parset): for k, v in reversed(replacedict.items()): if '{{ '+k+' }}' in str(self.parset[check]): -- GitLab