Patchwork [bitbake-devel] hob: modified how the existence of a variable is checked

login
register
mail settings
Submitter Cristiana Voicu
Date Dec. 3, 2012, 9:01 a.m.
Message ID <1354525279-13249-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/40027/
State New
Headers show

Comments

Cristiana Voicu - Dec. 3, 2012, 9:01 a.m.
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
index 6d8c38b..2ecd95d 100755
--- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
@@ -227,10 +227,9 @@  class BuildDetailsPage (HobPage):
         label = gtk.Label()
         label.set_alignment(0.0, 0.5)
         # Ensure variable disk_full is defined
-        try:
-            self.builder.disk_full
-        except NameError:
+        if not hasattr(self.builder, 'disk_full'):
             self.builder.disk_full = False
+
         if self.builder.disk_full:
             markup = "<span size='medium'>There is no disk space left, so Hob cannot finish building your image. Free up some disk space\n"
             markup += "and restart the build. Check the \"Issues\" tab for more details</span>"