From 684a7c655ba002bb657f93b4976625adde6ba3f7 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Thu, 8 Sep 2011 18:00:13 -0700 Subject: hob: correctly handle an exception It doesn't matter if we can't remove the temprorary file, for some reason, so catch the exception and ignore it. Partially addresses [YOCTO #1468] (Bitbake rev: 4394e38b038e1bc9845adf01d73363157d98c96d) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/hob.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index 84df37de73..8d2d1bd327 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py @@ -495,7 +495,11 @@ class MainWindow (gtk.Window): self.back.set_sensitive(True) self.cancel.set_sensitive(False) for f in self.files_to_clean: - os.remove(f) + try: + os.remove(f) + except OSError: + pass + self.files_to_clean.remove(f) self.files_to_clean = [] lbl = "Build completed\n\nClick 'Edit Image' to start another build or 'View Messages' to view the messages output during the build." -- cgit v1.2.3-54-g00ecf