Skip to contentSkip to conversation

] autobuilder/lib/buildsteps.py: BitbakeShellCommand fix errors on cmdComplete

PATCH New Aníbal Limón 1 participant 1 message Dec 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ] autobuilder/lib/buildsteps.py: BitbakeShellCommand fix errors on cmdComplete

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

---
 lib/python2.7/site-packages/autobuilder/lib/buildsteps.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/python2.7/site-packages/autobuilder/lib/buildsteps.py +1 -1
index af7d334..717fcf2 100644
@@ -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')
 
Signature · 1 line
2.1.4