@ -471,8 +471,10 @@ class ExecutionQueue(object):
self . ready_cond . release ( )
self . ready_cond . release ( )
assert not self . running , ' Now guaranteed to be single-threaded '
assert not self . running , ' Now guaranteed to be single-threaded '
if self . exceptions :
if self . exceptions :
# TODO(maruel): Get back the original stack location.
# To get back the stack location correctly, the raise a, b, c form must be
raise self . exceptions . pop ( 0 )
# used, passing a tuple as the first argument doesn't work.
e = self . exceptions . pop ( 0 )
raise e [ 0 ] , e [ 1 ] , e [ 2 ]
if self . progress :
if self . progress :
self . progress . end ( )
self . progress . end ( )
@ -491,9 +493,9 @@ class ExecutionQueue(object):
exception = None
exception = None
try :
try :
self . item . run ( * self . args , * * self . kwargs )
self . item . run ( * self . args , * * self . kwargs )
except Exception , e :
except Exception :
# TODO(maruel): Catch exception location.
# Catch exception location.
exception = e
exception = sys. exc_info( )
# This assumes the following code won't throw an exception. Bad.
# This assumes the following code won't throw an exception. Bad.
self . parent . ready_cond . acquire ( )
self . parent . ready_cond . acquire ( )