livemedia-creator: Make sure ROOT_PATH exists (#1144140)

If ROOT_PATH doesn't exist when making a tar file, create it first.

Related: rhbz#1144140
(cherry picked from commit da68471b33)
This commit is contained in:
Brian C. Lane 2014-09-22 16:27:06 -07:00
parent 018c9911a1
commit 1688a3c3a9

View File

@ -640,6 +640,7 @@ def novirt_install(opts, disk_img, disk_size, repo_url):
# Install directly into ROOT_PATH, make sure it starts clean
if os.path.exists(ROOT_PATH):
shutil.rmtree(ROOT_PATH)
if not os.path.isdir(ROOT_PATH):
os.mkdir(ROOT_PATH)
else:
args += ["--image", disk_img]