diff options
Diffstat (limited to 'Modules/_dbmmodule.c')
-rw-r--r-- | Modules/_dbmmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c index 327b873..83c051c 100644 --- a/Modules/_dbmmodule.c +++ b/Modules/_dbmmodule.c @@ -225,9 +225,9 @@ dbm_contains(PyObject *self, PyObject *arg) if (key.dptr == NULL) return -1; } - if (!PyBytes_Check(arg)) { + else if (!PyBytes_Check(arg)) { PyErr_Format(PyExc_TypeError, - "dbm key must be string, not %.100s", + "dbm key must be bytes or string, not %.100s", arg->ob_type->tp_name); return -1; } |