diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_bsddb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index 04e5af6..610451a 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -5560,15 +5560,13 @@ DBEnv_construct(PyObject* self, PyObject* args) static PyObject* DBSequence_construct(PyObject* self, PyObject* args, PyObject* kwargs) { - PyObject* dbobj = NULL; + PyObject* dbobj; int flags = 0; static char* kwnames[] = { "db", "flags", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:DBSequence", kwnames, &dbobj, &flags)) return NULL; - if (dbobj == Py_None) - dbobj = NULL; - else if (dbobj && !DBObject_Check(dbobj)) { + if (!DBObject_Check(dbobj)) { makeTypeError("DB", dbobj); return NULL; } |