summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-29 20:10:00 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-29 20:10:00 +0000
commit5d1d054e150bace05b8826d990d71c46834eef87 (patch)
tree4cf7b0bb2154ab79e957453ae3b767809b406eed /django
parentcaa0523cb8afc19fbbe193b8488eed810dc35829 (diff)
Fixed #6030 -- More robust error handling for the "float" filter. Thanks,
SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-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 ca03ff87e3..f2be64ef1d 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -91,7 +91,7 @@ def floatformat(text, arg=-1):
"""
try:
f = float(text)
- except ValueError:
+ except (ValueError, TypeError):
return u''
try:
d = int(arg)