From 160fc4f7dfb5fd70908666fd8bead698ed65f223 Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: Tue, 1 Sep 2020 18:09:27 +0800 Subject: [PATCH] createrepo: Ignore error when cleaning up tmp dir JIRA: RHELCMP-998 Signed-off-by: Haibo Lin --- pungi/phases/createrepo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pungi/phases/createrepo.py b/pungi/phases/createrepo.py index 9b8a0961..0ad8b3f9 100644 --- a/pungi/phases/createrepo.py +++ b/pungi/phases/createrepo.py @@ -383,7 +383,10 @@ def get_productids_from_scm(compose): product_id_path = compose.paths.work.product_id(arch, variant) shutil.copy2(pem_files[0], product_id_path) - shutil.rmtree(tmp_dir) + try: + shutil.rmtree(tmp_dir) + except Exception as e: + compose.log_warning("Failed to clean up tmp dir: %s %s" % (tmp_dir, str(e))) compose.log_info("[DONE ] %s" % msg)