mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46: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:
@@ -291,7 +291,7 @@ class BaseFormSet(StrAndUnicode):
|
||||
# Give self.clean() a chance to do cross-form validation.
|
||||
try:
|
||||
self.clean()
|
||||
except ValidationError, e:
|
||||
except ValidationError as e:
|
||||
self._non_form_errors = self.error_class(e.messages)
|
||||
|
||||
def clean(self):
|
||||
|
||||
Reference in New Issue
Block a user