Fix regression causing the template formatter to intepret a missing format letter as ERROR instead of 's'.

This commit is contained in:
Kovid Goyal 2011-01-07 12:17:26 -07:00
parent 65d790ad59
commit 5d6e4c8931

View File

@ -316,8 +316,6 @@ class TemplateFormatter(string.Formatter):
except:
raise ValueError(
_('format: type {0} requires a decimal (float) value, got {1}').format(typ, val))
else:
raise ValueError(_('format: unknown format type letter {0}').format(typ))
return unicode(('{0:'+fmt+'}').format(val))
def _explode_format_string(self, fmt):