livemedia-creator: Create parent dirs for logfile path
The directory where the --logfile is located is also used for other log files and for the anaconda logs when using --no-virt. Create the parent directories if they don't exist.
This commit is contained in:
parent
e9c1b5f200
commit
8641caca9e
@ -1093,6 +1093,9 @@ def setup_logging(opts):
|
||||
:param opts: options passed to livemedia-creator
|
||||
:type opts: argparse options
|
||||
"""
|
||||
if not os.path.isdir(os.path.abspath(os.path.dirname(opts.logfile))):
|
||||
os.makedirs(os.path.abspath(os.path.dirname(opts.logfile)))
|
||||
|
||||
# Setup logging to console and to logfile
|
||||
log.setLevel(logging.DEBUG)
|
||||
pylorax_log.setLevel(logging.DEBUG)
|
||||
|
Loading…
Reference in New Issue
Block a user