Kaydet (Commit) 8974f72b authored tarafından Gustavo Niemeyer's avatar Gustavo Niemeyer

When key is None, give up if _DB_get_type() returns -1 as well.

üst 024f2de0
......@@ -350,6 +350,8 @@ make_key_dbt(DBObject* self, PyObject* keyobj, DBT* key, int* pflags)
CLEAR_DBT(*key);
if (keyobj == Py_None) { /* TODO: is None really okay for keys? */
type = _DB_get_type(self);
if (type == -1)
return 0;
if (type == DB_RECNO || type == DB_QUEUE) {
PyErr_SetString(
PyExc_TypeError,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment