From 3904b74a3f2f92fefe1d39281ed683c52f2fef03 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 28 Apr 2012 18:09:37 +0200 Subject: 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). --- tests/regressiontests/model_fields/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/regressiontests/model_fields') diff --git a/tests/regressiontests/model_fields/tests.py b/tests/regressiontests/model_fields/tests.py index 8fe67fb606..ea1e1c7d99 100644 --- a/tests/regressiontests/model_fields/tests.py +++ b/tests/regressiontests/model_fields/tests.py @@ -44,7 +44,7 @@ class BasicFieldTests(test.TestCase): nullboolean = NullBooleanModel(nbfield=None) try: nullboolean.full_clean() - except ValidationError, e: + except ValidationError as e: self.fail("NullBooleanField failed validation with value of None: %s" % e.messages) def test_field_repr(self): -- cgit v1.3