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 748259619b
)
This commit is contained in:
parent
abfbd76af2
commit
9a64d851f1
@ -179,6 +179,9 @@ def main(args):
|
|||||||
|
|
||||||
opts.logfile = os.path.abspath(opts.logfile)
|
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)
|
setup_logging(opts)
|
||||||
|
|
||||||
tempfile.tempdir = opts.tmp
|
tempfile.tempdir = opts.tmp
|
||||||
|
Loading…
Reference in New Issue
Block a user