1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Removed some Python < 2.6 compatibility code. Refs #17965.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin
2012-03-30 09:20:04 +00:00
parent eb163f37cb
commit 4fe87c370d
5 changed files with 9 additions and 38 deletions

View File

@@ -1035,12 +1035,8 @@ class LiveServerThread(threading.Thread):
self.httpd = StoppableWSGIServer(
(self.host, port), QuietWSGIRequestHandler)
except WSGIServerException, e:
if sys.version_info < (2, 6):
error_code = e.args[0].args[0]
else:
error_code = e.args[0].errno
if (index + 1 < len(self.possible_ports) and
error_code == errno.EADDRINUSE):
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.
continue