From b30cba4e2bd764cd4f1ec5c0ae1664a078ce967b Mon Sep 17 00:00:00 2001
From: Jacob Kaplan-Moss <jacob@jacobian.org>
Date: Mon, 12 Oct 2009 16:53:23 +0000
Subject: [PATCH] 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
---
 django/template/defaultfilters.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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: