# HG changeset patch # User RĂ©mi Cardona # Date 1406036567 -7200 # Node ID acad42456767930a2a55a9933bbd0339babb1bee # Parent 6bcb460826ccb098ffa28cbf2b09b57ce36a0ac1 [utils] Remove function-in-the-middle call diff -r 6bcb460826cc -r acad42456767 utils.py --- a/utils.py Tue Jul 29 15:45:04 2014 +0200 +++ b/utils.py Tue Jul 22 15:42:47 2014 +0200 @@ -420,6 +420,8 @@ self.head = req.html_headers # main stream self.body = UStringIO() + # this method will be assigned to self.w in views + self.write = self.body.write self.doctype = u'' self._htmlattrs = [('lang', req.lang)] # keep main_stream's reference on req for easier text/html demoting @@ -445,11 +447,6 @@ warn('[3.17] xhtml is no more supported', DeprecationWarning, stacklevel=2) - def write(self, data): - """StringIO interface: this method will be assigned to self.w - """ - self.body.write(data) - @property def htmltag(self): attrs = ' '.join('%s="%s"' % (attr, xml_escape(value))