Commit 608bf213 authored by Jérome Perrin's avatar Jérome Perrin

patches/LongRequestLogger: supports python3

parent ffa6df6e
......@@ -15,7 +15,7 @@ import traceback
from six.moves import StringIO
from six.moves._thread import get_ident
from Products.ERP5Type.Utils import bytes2str
logger = logging.getLogger('Products.LongRequestLogger')
......@@ -60,7 +60,7 @@ class Dumper(object):
def _extract_sql(self, frame, func_code=DB._query.__code__):
while frame is not None:
if frame.f_code is func_code:
return frame.f_locals['query']
return bytes2str(frame.f_locals['query'])
frame = frame.f_back
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