Skip to contentSkip to conversation

cooker.py: fix bitbake -b

PATCH New Scott Garman 1 participant 1 message Jun 10, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker.py: fix bitbake -b

This avoids a null reference when bitbake -b is invoked, fixing the following error:

AttributeError: 'NoneType' object has no attribute 'bbfile_config_priorities'

---
 lib/bb/cooker.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
lib/bb/cooker.py +3 -2
index c23e3d4..cc5d939 100644
@@ -990,8 +990,9 @@ class BBCooker:
         files = (data.getVar( "BBFILES", self.configuration.data, 1 ) or "").split()
         data.setVar("BBFILES", " ".join(files), self.configuration.data)
 
-        # Sort files by priority
-        files.sort( key=lambda fileitem: self.calc_bbfile_priority(fileitem) )
+        if self.status:
+            # Sort files by priority
+            files.sort( key=lambda fileitem: self.calc_bbfile_priority(fileitem) )
 
         if not len(files):
             files = self.get_bbfiles()
Signature · 1 line
1.7.1