Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a10d0e

Browse filesBrowse files
authored
Support error numbers > CR_MAX_ERROR (PyMySQL#188)
fixes PyMySQL#187
1 parent f41e651 commit 1a10d0e
Copy full SHA for 1a10d0e

File tree

Expand file treeCollapse file tree

1 file changed

+1
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-10
lines changed

‎_mysql.c

Copy file name to clipboardExpand all lines: _mysql.c
+1-10Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,7 @@ _mysql_Exception(_mysql_ConnectionObject *c)
119119
return NULL;
120120
}
121121
merr = mysql_errno(&(c->connection));
122-
if (!merr)
123-
e = _mysql_InterfaceError;
124-
else if (merr > CR_MAX_ERROR) {
125-
PyTuple_SET_ITEM(t, 0, PyInt_FromLong(-1L));
126-
PyTuple_SET_ITEM(t, 1, PyString_FromString("error totally whack"));
127-
PyErr_SetObject(_mysql_InterfaceError, t);
128-
Py_DECREF(t);
129-
return NULL;
130-
}
131-
else switch (merr) {
122+
switch (merr) {
132123
case CR_COMMANDS_OUT_OF_SYNC:
133124
case ER_DB_CREATE_EXISTS:
134125
case ER_SYNTAX_ERROR:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.