diff options
Diffstat (limited to 'django/core/validators.py')
| -rw-r--r-- | django/core/validators.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/validators.py b/django/core/validators.py index ce8e6937fe..3d4bcc86c8 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -45,7 +45,7 @@ class URLValidator(RegexValidator): def __call__(self, value): try: super(URLValidator, self).__call__(value) - except ValidationError, e: + except ValidationError as e: # Trivial case failed. Try for possible IDN domain if value: value = smart_unicode(value) @@ -73,7 +73,7 @@ class EmailValidator(RegexValidator): def __call__(self, value): try: super(EmailValidator, self).__call__(value) - except ValidationError, e: + except ValidationError as e: # Trivial case failed. Try for possible IDN domain-part if value and u'@' in value: parts = value.split(u'@') |
