From 9a64d851f10fd0d12e750a498dfbebee973e6cb1 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 20 Jun 2016 12:03:14 -0700 Subject: [PATCH] Make sure cmdline config file exists (#1348302) If the --config file doesn't exist lorax will fall back to its defaults, which are probably not what you want. Now it will exit if it doesn't exist. Resolves: rhbz#1348302 (cherry picked from commit 748259619b5306479297b26aed043253f8a293be) --- src/sbin/lorax | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sbin/lorax b/src/sbin/lorax index d100ba9f..b687b2c3 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -179,6 +179,9 @@ def main(args): opts.logfile = os.path.abspath(opts.logfile) + if opts.config and not os.path.exists(opts.config): + parser.error("config file %s doesn't exist." % opts.config) + setup_logging(opts) tempfile.tempdir = opts.tmp