[poky] [denzil][PATCH 1/1] cooker: fix UnboundLocalError when exception occurs during parsing

McClintock Matthew-B29882 B29882 at freescale.com
Fri Aug 10 13:24:40 PDT 2012


I can confirm some users have seen this, I will try to get them to test it out.

-M

On Fri, Aug 10, 2012 at 11:13 AM, Paul Eggleton
<paul.eggleton at linux.intel.com> wrote:
> 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 at linux.intel.com>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> ---
>  bitbake/lib/bb/cooker.py |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 4a4dc38..4016f3b 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -1644,6 +1644,8 @@ class CookerParser(object):
>                      yield result
>
>      def parse_next(self):
> +        result = []
> +        parsed = None
>          try:
>              parsed, result = self.results.next()
>          except StopIteration:
> --
> 1.7.9.5
>
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky



More information about the poky mailing list