Skip to contentSkip to conversation

cooker: now that we use a Pool, raise the exceptions

PATCH In review Christopher Larson 2 participants 2 messages Feb 25, 2013 – Feb 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: now that we use a Pool, raise the exceptions

From: Christopher Larson <[email protected]>

Multiprocessing catches these and handles passing them between processes itself, we don't need to do it ourselves anymore.

[YOCTO #3926]

---
 bitbake/lib/bb/cooker.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/bb/cooker.py +2 -2
index 9f7121f..1b84e86 100644
@@ -1563,12 +1563,12 @@ def parse_file((filename, appends, caches_array)):
         tb = sys.exc_info()[2]
         exc.recipe = filename
         exc.traceback = list(bb.exceptions.extract_traceback(tb, context=3))
-        return True, exc
+        raise
     # Need to turn BaseExceptions into Exceptions here so we gracefully shutdown
     # and for example a worker thread doesn't just exit on its own in response to
     # a SystemExit event for example.
     except BaseException as exc:
-        return True, ParsingFailure(exc, filename)
+        raise ParsingFailure(exc, filename)
 
 class CookerParser(object):
     def __init__(self, cooker, filelist, masked):
Signature · 1 line
1.8.1.1
#1 lore raw
Quoted 11 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Multiprocessing catches these and handles passing them between processes itself, we don't need to do it ourselves anymore.

[YOCTO #3926]

---
 bitbake/lib/bb/cooker.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Makes sense, thanks (and merged)!

Richard