Commits

Hajime Nakagami committed b112481

modify _extract_error_code() at cymysql dialect

Comments (0)

Files changed (1)

lib/sqlalchemy/dialects/mysql/cymysql.py

         return __import__('cymysql')
 
     def _extract_error_code(self, exception):
-        # Py2K
-        return exception[0]
-        # end Py2K
-        # Py3K
-        #return exception.args[0].args[0]
+        return exception.errno
 
 dialect = MySQLDialect_cymysql