[bitbake-devel] [PATCH 4/4] event: fix resetting class handlers object

Paul Eggleton paul.eggleton at linux.intel.com
Mon Dec 8 18:09:22 UTC 2014


On Monday 08 December 2014 17:42:19 Richard Purdie wrote:
> On Mon, 2014-12-08 at 10:50 +0000, Paul Eggleton wrote:
> > If you don't explicitly specify to use a global variable when doing an
> > assignment, you will be setting a local variable instead, which means
> > this function wasn't working at all. It explains some odd behaviour we
> > have seen in the layer index where event handlers were sometimes
> > bleeding into other contexts where they should not have been.
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
> > ---
> > 
> >  lib/bb/event.py | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/bb/event.py b/lib/bb/event.py
> > index 9645476..8bc6b80 100644
> > --- a/lib/bb/event.py
> > +++ b/lib/bb/event.py
> > 
> > @@ -55,6 +55,7 @@ def get_class_handlers():
> >      return _handlers
> >  
> >  def set_class_handlers(h):
> > +    global handlers
> > 
> >      _handlers = h
> 
> Er, shouldn't this be _handlers?

Oh dear. Yes, it should. I've fixed that on the branch, but I'll do a bit more 
testing just to make sure it isn't breaking anything since the previous change 
wouldn't have made any impact at all.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the bitbake-devel mailing list