From 84afe4938dfa40aff388e48c1c0b159469656839 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 26 Mar 2021 12:41:42 +0100 Subject: [PATCH] fix: restore toggle & get previous behavior --- poezio/config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/poezio/config.py b/poezio/config.py index 9ecb4748..713eada7 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -203,9 +203,7 @@ class Config: returned """ if default is None: - section_val = self.default.get(section) - if section_val is not None: - default = section_val.get(option) + default = self.default.get(section, {}).get(option, '') res: Optional[ConfigValue] try: @@ -483,7 +481,7 @@ class Config: if isinstance(value, str) and value == "toggle": current = self.getbool(option, section) if isinstance(current, bool): - value = str(not current) + value = str(not current).lower() else: if current.lower() == "false": value = "true"