From d89f4171dab826098049cf491482448877f2352b Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sun, 13 Feb 2022 10:13:47 +0530 Subject: [PATCH] Disable interpolation in ConfigParser --- headphones/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headphones/config.py b/headphones/config.py index 35c392e7..181d8940 100644 --- a/headphones/config.py +++ b/headphones/config.py @@ -327,7 +327,7 @@ class Config(object): def __init__(self, config_file): """ Initialize the config with values from a file """ self._config_file = config_file - self._config = ConfigParser() + self._config = ConfigParser(interpolation=None) self._config.read(self._config_file) for key in list(_CONFIG_DEFINITIONS.keys()): self.check_setting(key) @@ -376,7 +376,7 @@ class Config(object): def write(self): """ Make a copy of the stored config and write it to the configured file """ - new_config = ConfigParser() + new_config = ConfigParser(interpolation=None) # first copy over everything from the old config, even if it is not # correctly defined to keep from losing data