Skip to content

Commit 2bed155

Browse files
Koalab99Corentin ARNOULD
and
Corentin ARNOULD
authored
Fix TypeError: exceptions must derive from BaseException (#329)
* Fix TypeError: exceptions must derive from BaseException * Fix WSGIAppError rewrapping --------- Co-authored-by: Corentin ARNOULD <corentin@keepcalm.dev>
1 parent a7948f6 commit 2bed155

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gabbi/case.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ def _run_request(
513513
)
514514
except wsgi_intercept.WSGIAppError as exc:
515515
# Extract and re-raise the wrapped exception.
516-
raise (exc.exception_type, exc.exception_value,
517-
exc.traceback)
516+
raise exc.exception_type(exc.exception_value).with_traceback(
517+
exc.traceback) from None
518518

519519
# Set headers and location attributes for follow on requests
520520
self.response = response

0 commit comments

Comments
 (0)