[bitbake-devel] [selftest][PATCH V1 4/5] bitbake: tests: Initialize data attribute on BuildBase event

Jair Gonzalez jair.de.jesus.gonzalez.plascencia at linux.intel.com
Thu Aug 17 20:40:53 UTC 2017


The BuildBase event class contains a cfg property for which the
corresponding data attribute was not being initialized on the
constructor. This caused that trying to access the property
without setting it first threw an AttributeError exception.

This change adds an initialization to None to the data attribute.

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia at linux.intel.com>
---
 lib/bb/event.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bb/event.py b/lib/bb/event.py
index 526c41f..76b09ec 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -432,6 +432,7 @@ class BuildBase(Event):
         self._pkgs = p
         Event.__init__(self)
         self._failures = failures
+        self.data = None
 
     def getPkgs(self):
         return self._pkgs
-- 
2.7.4




More information about the bitbake-devel mailing list