mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +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:
@@ -88,7 +88,7 @@ class CommonMiddlewareTest(TestCase):
|
||||
request)
|
||||
try:
|
||||
CommonMiddleware().process_request(request)
|
||||
except RuntimeError, e:
|
||||
except RuntimeError as e:
|
||||
self.assertTrue('end in a slash' in str(e))
|
||||
settings.DEBUG = False
|
||||
|
||||
@@ -202,7 +202,7 @@ class CommonMiddlewareTest(TestCase):
|
||||
request)
|
||||
try:
|
||||
CommonMiddleware().process_request(request)
|
||||
except RuntimeError, e:
|
||||
except RuntimeError as e:
|
||||
self.assertTrue('end in a slash' in str(e))
|
||||
settings.DEBUG = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user