Commit b182ce7b authored by Jim Fulton's avatar Jim Fulton

Fixed exception handling in get methods to only catch key errors.

parent b7ead086
......@@ -83,7 +83,7 @@
****************************************************************************/
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.13 2001/03/21 14:16:58 jim Exp $\n"
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.14 2001/03/30 20:42:22 jim Exp $\n"
/*
** _BTree_get
......@@ -1191,6 +1191,7 @@ BTree_getm(BTree *self, PyObject *args)
UNLESS (PyArg_ParseTuple(args, "O|O", &key, &d)) return NULL;
if ((r=_BTree_get(self, key, 0))) return r;
UNLESS (PyErr_ExceptionMatches(PyExc_KeyError)) return NULL;
PyErr_Clear();
Py_INCREF(d);
return d;
......
......@@ -82,7 +82,7 @@
****************************************************************************/
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.11 2001/03/30 15:50:18 brian Exp $\n"
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.12 2001/03/30 20:42:22 jim Exp $\n"
/*
** _bucket_get
......@@ -1057,6 +1057,7 @@ bucket_getm(Bucket *self, PyObject *args)
UNLESS (PyArg_ParseTuple(args, "O|O", &key, &d)) return NULL;
if ((r=_bucket_get(self, key, 0))) return r;
UNLESS (PyErr_ExceptionMatches(PyExc_KeyError)) return NULL;
PyErr_Clear();
Py_INCREF(d);
return d;
......
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