mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
This commit is contained in:
parent
eefb00f301
commit
3904b74a3f
107 changed files with 306 additions and 354 deletions
|
@ -102,7 +102,7 @@ class LiveServerViews(LiveServerBase):
|
|||
"""
|
||||
try:
|
||||
self.urlopen('/')
|
||||
except urllib2.HTTPError, err:
|
||||
except urllib2.HTTPError as err:
|
||||
self.assertEquals(err.code, 404, 'Expected 404 response')
|
||||
else:
|
||||
self.fail('Expected 404 response')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue