#1421 createiso: Ignore errors when deleting staging dir
Merged 3 years ago by lsedlar. Opened 3 years ago by hlin.
hlin/pungi RHELCMP-975  into  master

file modified
+6 -1
@@ -266,7 +266,12 @@ 

              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:

JIRA: RHELCMP-975
Signed-off-by: Haibo Lin hlin@redhat.com

I would bump the level to a warning, but it can be merged as is.

rebased onto b193fa0

3 years ago

Pull-Request has been merged by lsedlar

3 years ago