FIX: We shouldn't expand `cfgfile` if it's empty.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabio Manganiello 2023-09-21 01:18:15 +02:00
parent bdbe263905
commit 453b6becae
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 3 additions and 1 deletions

View File

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