This commit is contained in:
Kovid Goyal 2022-03-09 08:08:21 +05:30
parent 0012b7cd64
commit c1a06e9c37
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -421,6 +421,8 @@ class Config(ConfigInterface):
raise ValueError('The option %s is not defined.'%name)
if not os.path.exists(config_dir):
make_config_dir()
src = b''
with suppress(FileNotFoundError):
src = read_data(self.config_file_path)
opts = self.option_set.parse_string(src)
setattr(opts, name, val)