From 657b2cc87d98d01d800692907df995ba18617337 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 17 Aug 2023 11:25:49 +0200 Subject: [PATCH] Create the default configuration file even if --config is supplied but the file doesn't exist. --- platypush/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/config/__init__.py b/platypush/config/__init__.py index 4e6e1ee53..82c52eac3 100644 --- a/platypush/config/__init__.py +++ b/platypush/config/__init__.py @@ -104,7 +104,7 @@ class Config: if cfgfile is None: cfgfile = self._get_default_cfgfile() - if cfgfile is None: + if cfgfile is None or not os.path.exists(cfgfile): cfgfile = self._create_default_config() self._cfgfile = os.path.abspath(os.path.expanduser(cfgfile))