From c1a06e9c378375f5132350af3e33edfc05c1fffc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 9 Mar 2022 08:08:21 +0530 Subject: [PATCH] oops --- src/calibre/utils/config_base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/utils/config_base.py b/src/calibre/utils/config_base.py index 2b6aa64757..2e07ff6038 100644 --- a/src/calibre/utils/config_base.py +++ b/src/calibre/utils/config_base.py @@ -421,7 +421,9 @@ class Config(ConfigInterface): raise ValueError('The option %s is not defined.'%name) if not os.path.exists(config_dir): make_config_dir() - src = read_data(self.config_file_path) + src = b'' + with suppress(FileNotFoundError): + src = read_data(self.config_file_path) opts = self.option_set.parse_string(src) setattr(opts, name, val) src = self.option_set.serialize(opts)