From 66939c28b97928952d00fa907bb132c931181c48 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Mon, 12 Oct 2009 16:57:01 +0000 Subject: [PATCH] [1.1.X] Fixed #11993: fixed the the floatformat filter on NaN values in Python 2.6.3. Thanks, kklimonda. Backport if [11619] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11620 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: