From b193fa0ab74dcb1399b9ee3a6b02ce61c811f3a0 Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: Jul 07 2020 08:32:10 +0000 Subject: createiso: Ignore errors when deleting staging dir JIRA: RHELCMP-975 Signed-off-by: Haibo Lin --- diff --git a/pungi/phases/createiso.py b/pungi/phases/createiso.py index 0fe64d3..2b993c5 100644 --- a/pungi/phases/createiso.py +++ b/pungi/phases/createiso.py @@ -266,7 +266,12 @@ class CreateIsoThread(WorkerThread): arch, variant, filename=os.path.basename(cmd["iso_path"]), create_dir=False ) if os.path.exists(staging_dir): - shutil.rmtree(staging_dir) + try: + shutil.rmtree(staging_dir) + except Exception as e: + self.pool.log_warning( + "Failed to clean up staging dir: %s %s" % (staging_dir, str(e)) + ) self.pool.log_info("[DONE ] %s" % msg) if compose.notifier: