diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-05-30 17:17:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 17:21:16 +0100 |
commit | 1ae0181ba49ccfcb2d889de5dd1d8912b9e49157 (patch) | |
tree | b7a1b06fb56feac3ee96d0ad5de96e3a594179fe | |
parent | 9cb16f3c73751e7cf6d495586a6193f06eb97b1f (diff) | |
download | bitbake-1ae0181ba49ccfcb2d889de5dd1d8912b9e49157.tar.gz |
cooker: fix UnboundLocalError when exception occurs during parsing
Fix a recent regression where we see the following additional error
after an error occurs during parsing:
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/paul/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
self.cooker.updateCache()
File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1202, in updateCache
if not self.parser.parse_next():
File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1672, in parse_next
self.virtuals += len(result)
UnboundLocalError: local variable 'result' referenced before assignment
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/cooker.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index d1de7572d..b30945c4b 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -1646,6 +1646,8 @@ class CookerParser(object): yield result def parse_next(self): + result = [] + parsed = None try: parsed, result = self.results.next() except StopIteration: |