Author: guido.van.rossum
Date: Fri Aug 24 07:08:58 2007
New Revision: 57377

Modified:
   python/branches/py3k/Modules/_bsddb.c
Log:
Fix logic bug that triggered assert.


Modified: python/branches/py3k/Modules/_bsddb.c
==============================================================================
--- python/branches/py3k/Modules/_bsddb.c       (original)
+++ python/branches/py3k/Modules/_bsddb.c       Fri Aug 24 07:08:58 2007
@@ -379,8 +379,9 @@
     CLEAR_DBT(*dbt);
     if (obj == Py_None) {
         /* no need to do anything, the structure has already been zeroed */
+        return 1;
     }
-    else if (!PyBytes_Check(obj)) {
+    if (!PyBytes_Check(obj)) {
         PyErr_SetString(PyExc_TypeError,
                         "Data values must be of type bytes or None.");
         return 0;
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to