Commit 3dcde419 authored by Jérome Perrin's avatar Jérome Perrin

patches/LongRequestLogger: supports python3

parent 864448ff
...@@ -15,7 +15,7 @@ import traceback ...@@ -15,7 +15,7 @@ import traceback
from six.moves import StringIO from six.moves import StringIO
from six.moves._thread import get_ident from six.moves._thread import get_ident
from Products.ERP5Type.Utils import bytes2str
logger = logging.getLogger('Products.LongRequestLogger') logger = logging.getLogger('Products.LongRequestLogger')
...@@ -60,7 +60,7 @@ class Dumper(object): ...@@ -60,7 +60,7 @@ class Dumper(object):
def _extract_sql(self, frame, func_code=DB._query.__code__): def _extract_sql(self, frame, func_code=DB._query.__code__):
while frame is not None: while frame is not None:
if frame.f_code is func_code: if frame.f_code is func_code:
return frame.f_locals['query'] return bytes2str(frame.f_locals['query'])
frame = frame.f_back frame = frame.f_back
del DB del DB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment