[web/application] fix query log handling on python3
Writing bytes to a file opened in text mode doesn't work.
--- a/cubicweb/web/application.py Mon Feb 08 16:32:36 2016 +0100
+++ b/cubicweb/web/application.py Mon Feb 08 16:10:22 2016 +0100
@@ -232,13 +232,12 @@
result += ['%s %s -- (%.3f sec, %.3f CPU sec)' % q
for q in cnx.executed_queries]
cnx.executed_queries = []
- self._query_log.write('\n'.join(result).encode(req.encoding))
+ self._query_log.write('\n'.join(result))
self._query_log.flush()
except Exception:
self.exception('error while logging queries')
-
def main_handle_request(self, req, path):
"""Process an http request