Patchwork [bitbake-devel,2/4] bitbake: hob: check if parser has attribute 'shutdown'

login
register
mail settings
Submitter Irina Patru
Date Jan. 21, 2014, 3:59 p.m.
Message ID <1390319978-31756-2-git-send-email-irina.patru@intel.com>
Download mbox | patch
Permalink /patch/65371/
State New
Headers show

Comments

Irina Patru - Jan. 21, 2014, 3:59 p.m.
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>
---
 bitbake/lib/bb/cooker.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index db4cb51..3cf019b 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1240,7 +1240,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: