mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Fixed #18003 -- Preserved tracebacks when re-raising errors.
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user