diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/template/defaultfilters.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index 0ba16bc9a5..e6492dcd38 100644 --- a/django/template/defaultfilters.py +++ b/django/template/defaultfilters.py @@ -799,7 +799,7 @@ def filesizeformat(bytes): """ try: bytes = float(bytes) - except TypeError: + except (TypeError,ValueError,UnicodeDecodeError): return u"0 bytes" if bytes < 1024: |
