From 507d5cc2ccab6e1bff4731cfee663f615dc7ed57 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 23 May 2013 10:50:30 +0100 Subject: bitbake: cooker/cookerdata/event: Improve class handlers management Similarly to the execution context changes, establish better lifetime management API of the class event handlers. (Bitbake rev: 54e35a6cceead9521f8b1dacd48e55064e85c8bd) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index e8686475b9..4c0b569439 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1455,7 +1455,7 @@ class Parser(multiprocessing.Process): self.init = init multiprocessing.Process.__init__(self) self.context = bb.utils.get_context().copy() - self.handlers = bb.event._handlers.copy() + self.handlers = bb.event.get_class_handlers().copy() def run(self): if self.init: @@ -1492,7 +1492,7 @@ class Parser(multiprocessing.Process): try: # Reset our environment and handlers to the original settings bb.utils.set_context(self.context.copy()) - bb.event._handlers = self.handlers.copy() + bb.event.set_class_handlers(self.handlers.copy()) return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array) except Exception as exc: tb = sys.exc_info()[2] -- cgit v1.2.3-54-g00ecf