summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/cymysql.py
diff options
context:
space:
mode:
authorHajime Nakagami <nakagami@gmail.com>2013-02-26 22:57:16 +0900
committerHajime Nakagami <nakagami@gmail.com>2013-02-26 22:57:16 +0900
commitb8ba4f23a589538074d81f07a4a09b9b8c749f68 (patch)
treeed57d6da696d99ddae2cb67d1d3679fd51181bbe /lib/sqlalchemy/dialects/mysql/cymysql.py
parent7bb5f463dfeb39b8ba84a63147756d27901a2f56 (diff)
downloadsqlalchemy-b8ba4f23a589538074d81f07a4a09b9b8c749f68.tar.gz
return erro_code cymysql dialects
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/cymysql.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/cymysql.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/cymysql.py b/lib/sqlalchemy/dialects/mysql/cymysql.py
index 1d6f97787..da06121dc 100644
--- a/lib/sqlalchemy/dialects/mysql/cymysql.py
+++ b/lib/sqlalchemy/dialects/mysql/cymysql.py
@@ -26,9 +26,10 @@ class MySQLDialect_cymysql(MySQLDialect_mysqldb):
return __import__('cymysql')
def _extract_error_code(self, exception):
- v = exception.args[0]
- if not isinstance(v, int):
- v = v.args[0]
- return v
+ # Py2K
+ return exception[0]
+ # end Py2K
+ # Py3K
+ #return exception.args[0].args[0]
dialect = MySQLDialect_cymysql