diff options
Diffstat (limited to 'Modules/_sqlite/cursor.c')
-rw-r--r-- | Modules/_sqlite/cursor.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 01b9dc44cb5..38d94b2fb59 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -384,12 +384,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) if (multiple) { /* executemany() */ - if (!PyArg_ParseTuple(args, "OO", &operation, &second_argument)) { - goto error; - } - - if (!PyUnicode_Check(operation)) { - PyErr_SetString(PyExc_ValueError, "operation parameter must be str"); + if (!PyArg_ParseTuple(args, "UO", &operation, &second_argument)) { goto error; } @@ -406,12 +401,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) } } else { /* execute() */ - if (!PyArg_ParseTuple(args, "O|O", &operation, &second_argument)) { - goto error; - } - - if (!PyUnicode_Check(operation)) { - PyErr_SetString(PyExc_ValueError, "operation parameter must be str"); + if (!PyArg_ParseTuple(args, "U|O", &operation, &second_argument)) { goto error; } |