createrepo: Ignore error when cleaning up tmp dir

JIRA: RHELCMP-998
Signed-off-by: Haibo Lin <hlin@redhat.com>
This commit is contained in:
Haibo Lin 2020-09-01 18:09:27 +08:00
parent a6a96e40db
commit 160fc4f7df
1 changed files with 4 additions and 1 deletions

View File

@ -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)