Fix: replace primitive values in config without quotes (#612).

Merge pull request #62 from diivi/fix/config-json-replacement
This commit is contained in:
Dan Helfman 2023-03-24 23:45:36 -07:00 committed by GitHub
commit 4d01e53414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ def load_configuration(filename):
if config and 'constants' in config:
for key, value in config['constants'].items():
value = json.dumps(value)
file_contents = file_contents.replace(f'{{{key}}}', value)
file_contents = file_contents.replace(f'{{{key}}}', value.strip('"'))
config = yaml.load(file_contents)
del config['constants']
return config