[utils] Remove function-in-the-middle call
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 22 Jul 2014 15:42:47 +0200
changeset 10004 acad42456767
parent 10003 6bcb460826cc
child 10005 7769d0f61810
[utils] Remove function-in-the-middle call
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))