diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-06 22:35:27 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-06 22:35:27 (GMT) |
commit | 4a7cc8847276df27c8f52987cda619ca279687c2 (patch) | |
tree | 9bc7cfee8bf0fc27dc7f14ba4853c935d9f21b4c /Modules/_sqlite | |
parent | d81431f587e9eab67db683908548b0ad46847b38 (diff) | |
download | cpython-4a7cc8847276df27c8f52987cda619ca279687c2.zip cpython-4a7cc8847276df27c8f52987cda619ca279687c2.tar.gz cpython-4a7cc8847276df27c8f52987cda619ca279687c2.tar.bz2 |
Issue #23571: PyObject_Call(), PyCFunction_Call() and call_function() now
raise a SystemError if a function returns a result and raises an exception.
The SystemError is chained to the previous exception.
Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable.
Remove some checks which became useless (duplicate checks).
Change reviewed by Serhiy Storchaka.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/cursor.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 7fe00e3..c1599c0 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -334,11 +334,7 @@ PyObject* _pysqlite_fetch_one_row(pysqlite_Cursor* self) if (self->connection->text_factory == (PyObject*)&PyUnicode_Type) { converted = PyUnicode_FromStringAndSize(val_str, nbytes); if (!converted) { -#ifdef Py_DEBUG - /* in debug mode, type_call() fails with an assertion - error if an exception is set when it is called */ PyErr_Clear(); -#endif colname = sqlite3_column_name(self->statement->st, i); if (!colname) { colname = "<unknown column name>"; |