Stop creating iso_stage_dir before deleting

It's unreasonable to create the dir and then delete it immediately.

JIRA: RHELCMP-151
Signed-off-by: Haibo Lin <hlin@redhat.com>
This commit is contained in:
Haibo Lin 2020-04-20 11:57:00 +08:00
parent 5395af416c
commit 30f4771db1

View File

@ -263,7 +263,7 @@ class CreateIsoThread(WorkerThread):
# Delete staging directory if present.
staging_dir = compose.paths.work.iso_staging_dir(
arch, variant, filename=os.path.basename(cmd["iso_path"])
arch, variant, filename=os.path.basename(cmd["iso_path"]), create_dir=False
)
if os.path.exists(staging_dir):
shutil.rmtree(staging_dir)