[Zodb-checkins] CVS: Zope/lib/python/BTrees - BucketTemplate.c:1.21.2.2

Andreas Jung andreas@zope.com
Mon, 7 Jan 2002 11:50:51 -0500


Update of /cvs-repository/Zope/lib/python/BTrees
In directory cvs.zope.org:/tmp/cvs-serv17322

Modified Files:
      Tag: Zope-2_5-branch
	BucketTemplate.c 
Log Message:
added better error message when XXBucket() is called with invalid
arguments


=== Zope/lib/python/BTrees/BucketTemplate.c 1.21.2.1 => 1.21.2.2 ===
 	ind = -1;
       Py_DECREF(o);
-      if (ind < 0) goto err;
+      if (ind < 0) {
+        PyErr_SetString(PyExc_TypeError,"Sequence must contain 2-item tuples");
+        goto err;
+        }
     }
 
   Py_XDECREF(items);