Explorar o código

fix: replace primitive values in config without quotes

Divyansh Singh %!s(int64=2) %!d(string=hai) anos
pai
achega
a082cb87cb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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