fix cymysql's _extact_error_code() for py3

This commit is contained in:
Hajime Nakagami
2013-02-26 00:30:27 +09:00
parent 105c991c89
commit 7bb5f463df
+4 -1
View File
@@ -26,6 +26,9 @@ class MySQLDialect_cymysql(MySQLDialect_mysqldb):
return __import__('cymysql')
def _extract_error_code(self, exception):
return exception.args[0]
v = exception.args[0]
if not isinstance(v, int):
v = v.args[0]
return v
dialect = MySQLDialect_cymysql