From: Michael Tremer Date: Sat, 20 May 2017 10:05:43 +0000 (+0200) Subject: config: Don't file if a file does not exist X-Git-Tag: 0.9.28~1285^2~1347 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2a18d90eec1d268d1bf425e457b432bd5e5cd0;p=pakfire.git config: Don't file if a file does not exist Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/config.py b/src/pakfire/config.py index cccac7b4e..8d3b20b94 100644 --- a/src/pakfire/config.py +++ b/src/pakfire/config.py @@ -48,6 +48,10 @@ class Config(object): if not path.startswith("/"): path = os.path.join(CONFIG_DIR, path) + # Silently return if nothing is found + if not os.path.exists(path): + return + log.debug("Reading configuration from %s" % path) with open(path) as f: