浏览代码

fix: replace primitive values in config without quotes

Divyansh Singh 2 年之前
父节点
当前提交
a082cb87cb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      borgmatic/config/load.py

+ 1 - 1
borgmatic/config/load.py

@@ -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