Fixes TypeError thrown by parallel_select in DSL Helpers.
This applies to Python 3.0+ environments only. When an exception is re-reraised using six, an instance of the exception is passed as the first argument, which causes six.reraise to thrown a TypeError exception, after trying to instantiate an exception from an instance of an exception, rather than from an exception class. This fix simply changes the first argument to an exception class, instead of exception instance. Change-Id: I76f1ab6f1540880e9b8596071244b76f4f7478a0 Closes-Bug: #1651795 Related-Bug: #1638722
This commit is contained in:
parent
ccc430d507
commit
2060acce8b
@ -130,7 +130,7 @@ def parallel_select(collection, func, limit=1000):
|
||||
except StopIteration:
|
||||
return map(lambda t: t[0], result)
|
||||
else:
|
||||
six.reraise(exception[0], None, exception[2])
|
||||
six.reraise(type(exception[0]), exception[0], exception[2])
|
||||
|
||||
|
||||
def enum(**enums):
|
||||
|
Loading…
Reference in New Issue
Block a user