We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6b9f6a commit 293950fCopy full SHA for 293950f
tornado_mysql/cursors.py
@@ -302,7 +302,10 @@ def _do_get_result(self):
302
def _show_warnings(self, conn):
303
ws = yield conn.show_warnings()
304
for w in ws:
305
- warnings.warn(w[-1], err.Warning, 4)
+ msg = w[-1]
306
+ if PY2 and isinstance(msg, unicode):
307
+ msg = msg.encode('utf-8', 'replace')
308
+ warnings.warn(msg, err.Warning, 4)
309
310
def __iter__(self):
311
return iter(self.fetchone, None)
0 commit comments