1
0
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:
konarkmodi
2013-03-19 10:34:59 +05:30
committed by Carl Meyer
parent 1fe90b281b
commit bc4111ba68
15 changed files with 60 additions and 32 deletions

View File

@@ -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