summaryrefslogtreecommitdiff
path: root/lib/extras.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extras.py')
-rw-r--r--lib/extras.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/extras.py b/lib/extras.py
index 798b3d2..7ee52c7 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -455,6 +455,8 @@ class MinTimeLoggingConnection(LoggingConnection):
def filter(self, msg, curs):
t = (_time.time() - curs.timestamp) * 1000
if t > self._mintime:
+ if _sys.version_info[0] >= 3 and isinstance(msg, bytes):
+ msg = msg.decode(_ext.encodings[self.encoding], 'replace')
return msg + _os.linesep + " (execution time: %d ms)" % t
def cursor(self, *args, **kwargs):