summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-10-12 16:53:23 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-10-12 16:53:23 +0000
commitb30cba4e2bd764cd4f1ec5c0ae1664a078ce967b (patch)
tree7db8289f17ae1844847e528539a2c80e3e0df70d
parentc46ddbf1fc747a910702a348763d7949fba454f0 (diff)
Fixed #11993: fixed the the `floatformat` filter on `NaN` values in Python 2.6.3. Thanks, kklimonda.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/template/defaultfilters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index 47e116cd1a..2957c3d045 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -162,7 +162,7 @@ def floatformat(text, arg=-1):
try:
m = int(d) - d
- except (OverflowError, InvalidOperation):
+ except (ValueError, OverflowError, InvalidOperation):
return input_val
if not m and p < 0: