summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
Diffstat (limited to 'django/test')
-rw-r--r--django/test/testcases.py4
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