ditch the old "except Exception, e" syntax

This commit is contained in:
Stefan Wojcik
2016-12-05 23:23:38 -05:00
parent 25e0f12976
commit db673a9033
12 changed files with 57 additions and 57 deletions

View File

@@ -3106,7 +3106,7 @@ class FieldTest(unittest.TestCase):
try:
shirt.validate()
except ValidationError, error:
except ValidationError as error:
# get the validation rules
error_dict = error.to_dict()
self.assertEqual(error_dict['size'], SIZE_MESSAGE)
@@ -3494,7 +3494,7 @@ class FieldTest(unittest.TestCase):
self.assertRaises(ValidationError, post.validate)
try:
post.validate()
except ValidationError, error:
except ValidationError as error:
# ValidationError.errors property
self.assertTrue(hasattr(error, 'errors'))
self.assertTrue(isinstance(error.errors, dict))