From 2060acce8b9e8f5ce665d1731b12a7acf371a2b9 Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Wed, 21 Dec 2016 11:12:11 -0500 Subject: [PATCH] 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 --- murano/dsl/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/murano/dsl/helpers.py b/murano/dsl/helpers.py index ad18408ca..55895b3b8 100644 --- a/murano/dsl/helpers.py +++ b/murano/dsl/helpers.py @@ -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):