Ticket #6513: floatformat_catch_overflow.diff
File floatformat_catch_overflow.diff, 508 bytes (added by , 17 years ago) |
---|
-
django/template/defaultfilters.py
124 124 d = int(arg) 125 125 except ValueError: 126 126 return force_unicode(f) 127 m = f - int(f) 127 try: 128 m = f - int(f) 129 except OverflowError: 130 return force_unicode(f) 128 131 if not m and d < 0: 129 132 return mark_safe(u'%d' % int(f)) 130 133 else: