From: JINMEI Tatuya Date: Fri, 4 Jan 2013 22:15:50 +0000 (-0800) Subject: [2438] make sure intermediate errors are cleared. X-Git-Tag: bind10-1.0.0-rc-release~76^2~21^2~3^2^2~11^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b927f6e09523bcadf613b4e409a0039e5bfbb03c;p=thirdparty%2Fkea.git [2438] make sure intermediate errors are cleared. --- diff --git a/src/lib/dns/python/rrset_collection_python.cc b/src/lib/dns/python/rrset_collection_python.cc index 82cfdf32cb..0834026a0f 100644 --- a/src/lib/dns/python/rrset_collection_python.cc +++ b/src/lib/dns/python/rrset_collection_python.cc @@ -234,6 +234,7 @@ RRsetCollection_init(PyObject* po_self, PyObject* args, PyObject*) { return (0); } else if (PyArg_ParseTuple(args, "y*O!O!", &py_buf, &name_type, &po_name,&rrclass_type, &po_rrclass)) { + PyErr_Clear(); // clear the error for the first ParseTuple const char* const cp = static_cast(py_buf.buf); std::istringstream iss(string(cp, cp + py_buf.len)); self->cppobj = @@ -241,6 +242,7 @@ RRsetCollection_init(PyObject* po_self, PyObject* args, PyObject*) { PyRRClass_ToRRClass(po_rrclass)); return (0); } else if (PyArg_ParseTuple(args, "")) { + PyErr_Clear(); // clear the error for the second ParseTuple self->cppobj = new RRsetCollection; return (0); }