]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: hob: check if parser has attribute 'shutdown'
authorIrina Patru <irina.patru@intel.com>
Tue, 21 Jan 2014 15:59:36 +0000 (17:59 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jan 2014 21:43:37 +0000 (21:43 +0000)
It must be checked first if parser has the attribute 'shutdown' when
user hits Stop button and the forceshutdown state is given.

[HOB #5579]

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index cc7d84ef71f952a5c7f5564088d352f7cd9a1d5c..96f05b5309bf0691b74f4b0bda574e024e8fb9ca 100644 (file)
@@ -1245,7 +1245,8 @@ class BBCooker:
             return
 
         if self.state in (state.shutdown, state.forceshutdown):
-            self.parser.shutdown(clean=False, force = True)
+            if hasattr(self.parser, 'shutdown'):
+                self.parser.shutdown(clean=False, force = True)
             raise bb.BBHandledException()
 
         if self.state != state.parsing: