From e9dac3c31a921606e9e8bf7fda5a585665e35962 Mon Sep 17 00:00:00 2001 From: Guillaume Taquet Gasperini Date: Thu, 2 Apr 2020 18:55:00 +0200 Subject: [PATCH] disable interpolation for config reader This caused strings whith the '%' character in it to be interpreted by Python's ConfigParser. This behavior is not needed for DashMachine, the goal is to read exactly what the user types. Setting interpolation to None fixes this. See: https://docs.python.org/3/library/configparser.html?highlight=configparser#interpolation-of-values --- dashmachine/main/read_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashmachine/main/read_config.py b/dashmachine/main/read_config.py index 2a019a4..e958a20 100644 --- a/dashmachine/main/read_config.py +++ b/dashmachine/main/read_config.py @@ -22,7 +22,7 @@ def row2dict(row): def read_config(): - config = ConfigParser() + config = ConfigParser(interpolation=None) try: config.read(os.path.join(user_data_folder, "config.ini")) except Exception as e: