FIX: We shouldn't expand cfgfile if it's empty.

This commit is contained in:
Fabio Manganiello 2023-09-21 01:18:15 +02:00
parent bdbe263905
commit 453b6becae
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

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