summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 41f70ab95a..e8686475b9 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1454,7 +1454,7 @@ class Parser(multiprocessing.Process):
1454 self.quit = quit 1454 self.quit = quit
1455 self.init = init 1455 self.init = init
1456 multiprocessing.Process.__init__(self) 1456 multiprocessing.Process.__init__(self)
1457 self.context = bb.utils._context.copy() 1457 self.context = bb.utils.get_context().copy()
1458 self.handlers = bb.event._handlers.copy() 1458 self.handlers = bb.event._handlers.copy()
1459 1459
1460 def run(self): 1460 def run(self):
@@ -1490,7 +1490,8 @@ class Parser(multiprocessing.Process):
1490 1490
1491 def parse(self, filename, appends, caches_array): 1491 def parse(self, filename, appends, caches_array):
1492 try: 1492 try:
1493 bb.utils._context = self.context.copy() 1493 # Reset our environment and handlers to the original settings
1494 bb.utils.set_context(self.context.copy())
1494 bb.event._handlers = self.handlers.copy() 1495 bb.event._handlers = self.handlers.copy()
1495 return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array) 1496 return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array)
1496 except Exception as exc: 1497 except Exception as exc: