diff options
| author | Julien Phalip <jphalip@gmail.com> | 2012-11-25 12:55:23 +0100 |
|---|---|---|
| committer | Julien Phalip <jphalip@gmail.com> | 2012-11-25 12:57:14 +0100 |
| commit | 2e5b725197db406aa8b94aa4a86e2bac3dc571b1 (patch) | |
| tree | e265e879e4aeca139faf1b9b67f94e8e12427a87 | |
| parent | 8c2f36260e71acb41596004f6abc2ead4c917f6d (diff) | |
[1.5.x] Fixed #19355 -- Improved LiveServerThread's handling of exceptions. Thanks to flub for the report.
Backport of 612357f8ef
| -rw-r--r-- | django/test/testcases.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index 3bb40a5838..6b4885f93f 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -1022,6 +1022,7 @@ class LiveServerThread(threading.Thread): (self.host, port), QuietWSGIRequestHandler) except WSGIServerException as e: if (index + 1 < len(self.possible_ports) and + hasattr(e.args[0], 'errno') and e.args[0].errno == errno.EADDRINUSE): # This port is already in use, so we go on and try with # the next one in the list. |
