Skip to contentSkip to conversation

bitbake: hob/builder: Hob crashes because of bad init

PATCH Applied Cristian Iorga 2 participants 2 messages Oct 25, 2012 – Oct 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: hob/builder: Hob crashes because of bad init

Image selection is not properly initialized to none, and it used before having a chance to have a value. Due to dynamic nature of Python, variable is used before it exists, in this case. This causes a crash. Bug introduced during the fix of [YOCTO #3228]

Fixes [YOCTO #3334]

---
 bitbake/lib/bb/ui/crumbs/builder.py |    1 +
 1 file changed, 1 insertion(+)
bitbake/lib/bb/ui/crumbs/builder.py +1 -0
index 2fc4a29..3c3d303 100755
@@ -89,6 +89,7 @@ class Configuration:
 
     def __init__(self):
         self.curr_mach = ""
+        self.selected_image = None
         # settings
         self.curr_distro = ""
         self.dldir = self.sstatedir = self.sstatemirror = ""
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 6 lines · Cristian Iorga

Image selection is not properly initialized to none, and it used before having a chance to have a value. Due to dynamic nature of Python, variable is used before it exists, in this case. This causes a crash. Bug introduced during the fix of [YOCTO #3228]

Quoted 6 lines

Fixes [YOCTO #3334]

---
 bitbake/lib/bb/ui/crumbs/builder.py |    1 +
 1 file changed, 1 insertion(+)

Merged to master, thanks.

Richard