diff options
author | mathieui <mathieui@mathieui.net> | 2021-03-26 12:41:42 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-02 17:44:36 +0200 |
commit | 84afe4938dfa40aff388e48c1c0b159469656839 (patch) | |
tree | f67c19eba6b4cf8c40d11b306e3266eaec3ff8b9 | |
parent | c0c0155ba387345767b52994032a168e38d21b03 (diff) | |
download | poezio-84afe4938dfa40aff388e48c1c0b159469656839.tar.gz poezio-84afe4938dfa40aff388e48c1c0b159469656839.tar.bz2 poezio-84afe4938dfa40aff388e48c1c0b159469656839.tar.xz poezio-84afe4938dfa40aff388e48c1c0b159469656839.zip |
fix: restore toggle & get previous behavior
-rw-r--r-- | poezio/config.py | 6 |
1 files 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" |