Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
412e1fc0
Commit
412e1fc0
authored
Jul 17, 2012
by
JINMEI Tatuya
Browse files
[trac2116/master] don't set pyerr string in Name.split() on success.
parent
71263751
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/python/name_python.cc
View file @
412e1fc0
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment