Commit 412e1fc0 authored by JINMEI Tatuya's avatar JINMEI Tatuya

[trac2116/master] don't set pyerr string in Name.split() on success.

parent 71263751
......@@ -386,7 +386,7 @@ Name_split(s_Name* self, PyObject* args) {
ret->cppobj = NULL;
try {
ret->cppobj = new Name(self->cppobj->split(first, n));
} catch(const isc::OutOfRange& oor) {
} catch (const isc::OutOfRange& oor) {
PyErr_SetString(PyExc_IndexError, oor.what());
ret->cppobj = NULL;
}
......@@ -408,7 +408,7 @@ Name_split(s_Name* self, PyObject* args) {
ret->cppobj = NULL;
try {
ret->cppobj = new Name(self->cppobj->split(n));
} catch(const isc::OutOfRange& oor) {
} catch (const isc::OutOfRange& oor) {
PyErr_SetString(PyExc_IndexError, oor.what());
ret->cppobj = NULL;
}
......@@ -417,11 +417,10 @@ Name_split(s_Name* self, PyObject* args) {
return (NULL);
}
}
} else {
PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "No valid type in split argument");
}
PyErr_Clear();
PyErr_SetString(PyExc_TypeError,
"No valid type in split argument");
return (ret);
}
......
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