mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
@@ -61,7 +61,7 @@ class EggLoadingTest(TestCase):
|
||||
self.assertRaises(ImportError, load_app, 'broken_app')
|
||||
try:
|
||||
load_app('broken_app')
|
||||
except ImportError, e:
|
||||
except ImportError as e:
|
||||
# Make sure the message is indicating the actual
|
||||
# problem in the broken app.
|
||||
self.assertTrue("modelz" in e.args[0])
|
||||
|
||||
Reference in New Issue
Block a user