Correct fix for the formatter strip_results problem -- define the attribute in __init__

This commit is contained in:
Charles Haley 2014-07-02 23:19:05 +02:00
parent eac3ae43e9
commit 3848d7bf7d

View File

@ -322,6 +322,7 @@ class TemplateFormatter(string.Formatter):
string.Formatter.__init__(self) string.Formatter.__init__(self)
self.book = None self.book = None
self.kwargs = None self.kwargs = None
self.strip_results = True
self.locals = {} self.locals = {}
def _do_format(self, val, fmt): def _do_format(self, val, fmt):