From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id EDE63724B4 for ; Mon, 8 Dec 2014 17:42:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id sB8HfwGx008264; Mon, 8 Dec 2014 17:41:58 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 47nYRIOL91zu; Mon, 8 Dec 2014 17:41:58 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id sB8HfgAn008250 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 8 Dec 2014 17:41:54 GMT Message-ID: <1418060539.22903.24.camel@linuxfoundation.org> From: Richard Purdie To: Paul Eggleton Date: Mon, 08 Dec 2014 17:42:19 +0000 In-Reply-To: References: X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Cc: bitbake-devel@lists.openembedded.org Subject: Re: [PATCH 4/4] event: fix resetting class handlers object X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2014 17:42:44 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 > --- > 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? Cheers, Richard > def clean_class_handlers(): > -- > 1.9.3 >