diff options
-rw-r--r-- | bitbake/lib/bb/cooker.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index eac956aa97..c4d720a6b6 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -2087,12 +2087,12 @@ class Parser(multiprocessing.Process): | |||
2087 | tb = sys.exc_info()[2] | 2087 | tb = sys.exc_info()[2] |
2088 | exc.recipe = filename | 2088 | exc.recipe = filename |
2089 | exc.traceback = list(bb.exceptions.extract_traceback(tb, context=3)) | 2089 | exc.traceback = list(bb.exceptions.extract_traceback(tb, context=3)) |
2090 | return True, exc | 2090 | return True, None, exc |
2091 | # Need to turn BaseExceptions into Exceptions here so we gracefully shutdown | 2091 | # Need to turn BaseExceptions into Exceptions here so we gracefully shutdown |
2092 | # and for example a worker thread doesn't just exit on its own in response to | 2092 | # and for example a worker thread doesn't just exit on its own in response to |
2093 | # a SystemExit event for example. | 2093 | # a SystemExit event for example. |
2094 | except BaseException as exc: | 2094 | except BaseException as exc: |
2095 | return True, ParsingFailure(exc, filename) | 2095 | return True, None, ParsingFailure(exc, filename) |
2096 | finally: | 2096 | finally: |
2097 | bb.event.LogHandler.filter = origfilter | 2097 | bb.event.LogHandler.filter = origfilter |
2098 | 2098 | ||
@@ -2252,11 +2252,7 @@ class CookerParser(object): | |||
2252 | pass | 2252 | pass |
2253 | else: | 2253 | else: |
2254 | empty = False | 2254 | empty = False |
2255 | value = result[1] | 2255 | yield result |
2256 | if isinstance(value, BaseException): | ||
2257 | raise value | ||
2258 | else: | ||
2259 | yield result | ||
2260 | 2256 | ||
2261 | if not (self.parsed >= self.toparse): | 2257 | if not (self.parsed >= self.toparse): |
2262 | raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? Exiting.", None) | 2258 | raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? Exiting.", None) |
@@ -2267,6 +2263,9 @@ class CookerParser(object): | |||
2267 | parsed = None | 2263 | parsed = None |
2268 | try: | 2264 | try: |
2269 | parsed, mc, result = next(self.results) | 2265 | parsed, mc, result = next(self.results) |
2266 | if isinstance(result, BaseException): | ||
2267 | # Turn exceptions back into exceptions | ||
2268 | raise result | ||
2270 | except StopIteration: | 2269 | except StopIteration: |
2271 | self.shutdown() | 2270 | self.shutdown() |
2272 | return False | 2271 | return False |