Create the default configuration file even if --config is supplied but the file doesn't exist.

This commit is contained in:
Fabio Manganiello 2023-08-17 11:25:49 +02:00
parent afa4de5673
commit 657b2cc87d
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -104,7 +104,7 @@ class Config:
if cfgfile is None: if cfgfile is None:
cfgfile = self._get_default_cfgfile() cfgfile = self._get_default_cfgfile()
if cfgfile is None: if cfgfile is None or not os.path.exists(cfgfile):
cfgfile = self._create_default_config() cfgfile = self._create_default_config()
self._cfgfile = os.path.abspath(os.path.expanduser(cfgfile)) self._cfgfile = os.path.abspath(os.path.expanduser(cfgfile))