diff options
author | konarkmodi <modi.konark@gmail.com> | 2013-03-19 10:34:59 +0530 |
---|---|---|
committer | Carl Meyer <carl@oddbird.net> | 2013-03-19 15:42:39 -0700 |
commit | bc4111ba68e5eede1f68882a16d68441a845e30b (patch) | |
tree | 0b7689470b8ff28cdaee5fbe5053b81c720fd497 /django/test | |
parent | 1fe90b281baa1601e4582fd9454b92740e527d89 (diff) | |
download | django-bc4111ba68e5eede1f68882a16d68441a845e30b.tar.gz |
Fixed #18003 -- Preserved tracebacks when re-raising errors.
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
Diffstat (limited to 'django/test')
-rw-r--r-- | django/test/testcases.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index 87779eabfd..66026dd23e 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -1119,8 +1119,8 @@ class LiveServerTestCase(TransactionTestCase): for port in range(extremes[0], extremes[1] + 1): possible_ports.append(port) except Exception: - raise ImproperlyConfigured('Invalid address ("%s") for live ' - 'server.' % specified_address) + msg = 'Invalid address ("%s") for live server.' % specified_address + six.reraise(ImproperlyConfigured, ImproperlyConfigured(msg), sys.exc_info()[2]) cls.server_thread = LiveServerThread( host, possible_ports, connections_override) cls.server_thread.daemon = True |