summaryrefslogtreecommitdiff
path: root/django/forms/util.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-04-28 18:09:37 +0200
committerClaude Paroz <claude@2xlibre.net>2012-04-29 20:57:15 +0200
commit3904b74a3f2f92fefe1d39281ed683c52f2fef03 (patch)
tree1ae8f65371ed53df205553f41c9d0f90d1e9fee9 /django/forms/util.py
parenteefb00f30124f775ca52258ccd8549054fe8230f (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 'django/forms/util.py')
-rw-r--r--django/forms/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/util.py b/django/forms/util.py
index 886f08e581..6690442534 100644
--- a/django/forms/util.py
+++ b/django/forms/util.py
@@ -66,7 +66,7 @@ def from_current_timezone(value):
current_timezone = timezone.get_current_timezone()
try:
return timezone.make_aware(value, current_timezone)
- except Exception, e:
+ except Exception:
raise ValidationError(_('%(datetime)s couldn\'t be interpreted '
'in time zone %(current_timezone)s; it '
'may be ambiguous or it may not exist.')