cooker: fix UnboundLocalError when exception occurs during parsing
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 30 May 2012 16:17:15 +0000 (17:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 May 2012 16:23:31 +0000 (17:23 +0100)
commitefe74980c5b9169203b9dacbb2e90037bc7fd33e
tree107f400457640c28af4e5d6eb87bfe008aaf530f
parent3276d8c8e555b4f48bc0e71ab7301251156d021b
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

(Bitbake rev: 1ae0181ba49ccfcb2d889de5dd1d8912b9e49157)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cooker.py