From ba8340131e18692066f02d10f23834f8ffe0fdab Mon Sep 17 00:00:00 2001 From: Karl-Hermann Wieners <karl-hermann.wieners@mpimet.mpg.de> Date: Wed, 30 Oct 2019 15:13:32 +0000 Subject: [PATCH] mkexp: fixed get_file to use job's variable format when keeping native variables --- files.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files.py b/files.py index 4e1eaef..a0b1519 100644 --- a/files.py +++ b/files.py @@ -43,8 +43,9 @@ def get_file(section, name): if not os.path.isabs(input_file): input_file = os.path.join(_get_dir(section), input_file) + var_format = section.main['JOB'].get('.var_format', '${%s}') result = re.sub(r'\$\{(\w+)\}', - lambda m: section.main.get(m.group(1), '${'+m.group(1)+'}'), + lambda m: section.main.get(m.group(1), var_format%m.group(1)), input_file) return result -- GitLab