diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-11-29 08:06:30 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:45 +0000 |
commit | 5bff22988c9b5cf8ada82f4488c6a74dc8e77e17 (patch) | |
tree | a58e3bf563c30ae1daba6a1f80bd76b0b4b4ac29 /bitbake | |
parent | 8faec0b6720b942d420aa9f17d8a67555882b3e1 (diff) | |
download | openembedded-core-5bff22988c9b5cf8ada82f4488c6a74dc8e77e17.tar.gz openembedded-core-5bff22988c9b5cf8ada82f4488c6a74dc8e77e17.tar.bz2 openembedded-core-5bff22988c9b5cf8ada82f4488c6a74dc8e77e17.zip |
cooker: pass back child exceptions to the server
(Bitbake rev: 0f68f8bcd0e0aa944f76f88a4a85c9bcc1e42bee)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 0ed70f9bd8..f5a7b02921 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1017,8 +1017,12 @@ class CookerParser(object): def worker(input, output, cfgdata): signal.signal(signal.SIGINT, signal.SIG_IGN) for filename, appends in iter(input.get, 'STOP'): - infos = bb.cache.Cache.parse(filename, appends, cfgdata) - output.put(infos) + try: + infos = bb.cache.Cache.parse(filename, appends, cfgdata) + except bb.parse.ParseError as exc: + output.put(exc) + else: + output.put(infos) self.processes = [] for i in xrange(self.num_processes): @@ -1070,10 +1074,12 @@ class CookerParser(object): try: if self.result_queue.empty() and self.fromcache: filename, appends = self.fromcache.pop() - _, infos = self.bb_cache.load(filename, appends, self.cfgdata) + _, result = self.bb_cache.load(filename, appends, self.cfgdata) parsed = False else: - infos = self.result_queue.get() + result = self.result_queue.get() + if isinstance(result, Exception): + raise result parsed = True except KeyboardInterrupt: self.shutdown(clean=False) @@ -1086,9 +1092,9 @@ class CookerParser(object): self.parsed += 1 else: self.cached += 1 - self.virtuals += len(infos) + self.virtuals += len(result) - for virtualfn, info in infos: + for virtualfn, info in result: if info.skipped: self.skipped += 1 else: |