Skip to content

Commit

Permalink
fix for variable substitution #67
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Mar 16, 2018
1 parent 400b77b commit 94d622c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clam/common/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2482,8 +2482,8 @@ def loadconfig(callername, required=True):
data = yaml.safe_load(f.read())
for key, value in data.items():
#replace variables
if '{' in value:
variables = re.findall(r"\{\{\w+\}\}")
if isinstance(value,str) and '{' in value:
variables = re.findall(r"\{\{\w+\}\}", value)
for v in variables:
if v.strip('{}') in os.environ:
value = value.replace(v,os.environ[v.strip('{}')])
Expand Down

0 comments on commit 94d622c

Please sign in to comment.