diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-04-28 18:09:37 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-04-29 20:57:15 +0200 |
| commit | 3904b74a3f2f92fefe1d39281ed683c52f2fef03 (patch) | |
| tree | 1ae8f65371ed53df205553f41c9d0f90d1e9fee9 /tests/modeltests/get_or_create/tests.py | |
| parent | eefb00f30124f775ca52258ccd8549054fe8230f (diff) | |
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).
Diffstat (limited to 'tests/modeltests/get_or_create/tests.py')
| -rw-r--r-- | tests/modeltests/get_or_create/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/modeltests/get_or_create/tests.py b/tests/modeltests/get_or_create/tests.py index f98f0e63d8..1e300fbb4d 100644 --- a/tests/modeltests/get_or_create/tests.py +++ b/tests/modeltests/get_or_create/tests.py @@ -60,7 +60,7 @@ class GetOrCreateTests(TestCase): # the actual traceback. Refs #16340. try: ManualPrimaryKeyTest.objects.get_or_create(id=1, data="Different") - except IntegrityError, e: + except IntegrityError as e: formatted_traceback = traceback.format_exc() self.assertIn('obj.save', formatted_traceback) |
