diff options
| author | Nicolas Delaby <nicolas@noa.one> | 2017-11-23 17:18:03 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-11-28 18:55:23 -0500 |
| commit | 746caf3ef821dbf7588797cb2600fa81b9df9d1d (patch) | |
| tree | 1007535c32eb1cdd044a4d0a31118e70dec75dd4 /django/test/client.py | |
| parent | 7a6fbf36b1fdb8978ea0842075ccce83bcd63789 (diff) | |
Fixed #28837 -- Fixed test client crash if an exception with more than one arg is raised.
Also removed usage of the problematic pattern elsewhere.
Regression in 6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba.
Diffstat (limited to 'django/test/client.py')
| -rw-r--r-- | django/test/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/test/client.py b/django/test/client.py index d47cb087b8..6406f8309e 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -480,9 +480,9 @@ class Client(RequestFactory): # Also make sure that the signalled exception is cleared from # the local cache! if self.exc_info: - exc_info = self.exc_info + _, exc_value, _ = self.exc_info self.exc_info = None - raise exc_info[0](exc_info[1]).with_traceback(exc_info[2]) + raise exc_value # Save the client and request that stimulated the response. response.client = self |
