summaryrefslogtreecommitdiff
path: root/django/test/testcases.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/test/testcases.py')
-rw-r--r--django/test/testcases.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index b923bde139..c9fe1b3a86 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -84,7 +84,7 @@ def restore_transaction_methods():
def assert_and_parse_html(self, html, user_msg, msg):
try:
dom = parse_html(html)
- except HTMLParseError, e:
+ except HTMLParseError as e:
standardMsg = u'%s\n%s' % (msg, e.msg)
self.fail(self._formatMessage(user_msg, standardMsg))
return dom
@@ -1035,7 +1035,7 @@ class LiveServerThread(threading.Thread):
try:
self.httpd = StoppableWSGIServer(
(self.host, port), QuietWSGIRequestHandler)
- except WSGIServerException, e:
+ except WSGIServerException as e:
if (index + 1 < len(self.possible_ports) and
e.args[0].errno == errno.EADDRINUSE):
# This port is already in use, so we go on and try with
@@ -1054,7 +1054,7 @@ class LiveServerThread(threading.Thread):
self.httpd.set_app(handler)
self.is_ready.set()
self.httpd.serve_forever()
- except Exception, e:
+ except Exception as e:
self.error = e
self.is_ready.set()