[yocto] [[PATCH][yocto-autobuilder]] autobuilder/lib/buildsteps.py: BitbakeShellCommand fix errors on cmdComplete

Aníbal Limón anibal.limon at linux.intel.com
Wed Dec 7 14:57:34 PST 2016


In some cases commandComplete could be executed before stdio log
observer creates a errors attribute. In order to avoid a crash adds
hasattr validation.

Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
 lib/python2.7/site-packages/autobuilder/lib/buildsteps.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py b/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py
index af7d334..717fcf2 100644
--- a/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py
+++ b/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py
@@ -145,7 +145,7 @@ class BitbakeShellCommand(ShellCommand):
 
     def commandComplete(self, cmd):
         if cmd.didFail():
-            if self.errors['bitbake']:
+            if hasattr(self, 'errors') and self.errors['bitbake']:
                 buildername = self.getProperty('buildername')
                 buildnumber = self.getProperty('buildnumber')
 
-- 
2.1.4




More information about the yocto mailing list