Commit c9a78661 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[2379] Cleanup some docs and variables

parent a8b060aa
......@@ -378,10 +378,9 @@ DataSourceClient&
PyDataSourceClient_ToDataSourceClient(PyObject* client_obj) {
if (client_obj == NULL) {
isc_throw(PyCPPWrapperException,
"obj argument NULL in Name PyObject conversion");
"argument NULL in DataSourceClient PyObject conversion");
}
const s_DataSourceClient* client =
static_cast<const s_DataSourceClient*>(client_obj);
s_DataSourceClient* client = static_cast<s_DataSourceClient*>(client_obj);
return (*client->client);
}
......
......@@ -44,6 +44,14 @@ wrapDataSourceClient(DataSourceClient* client,
LifeKeeper>& life_keeper = boost::shared_ptr<ClientList::
FindResult::LifeKeeper>());
/// \brief Returns a reference to the DataSourceClient object contained
/// in the given Python object.
///
/// \note The given object MUST be of type DataSourceClient; this can be
/// checked with the right call to ParseTuple("O!")
///
/// \param client_obj Python object holding the DataSourceClient
/// \return reference to the DataSourceClient object
DataSourceClient&
PyDataSourceClient_ToDataSourceClient(PyObject* client_obj);
......
......@@ -62,6 +62,10 @@ ZoneLoader_init(PyObject* po_self, PyObject* args, PyObject*) {
&po_target_client, &name_type, &po_name,
&datasourceclient_type, &po_source_client)
) {
PyErr_SetString(PyExc_TypeError,
"Invalid arguments to ZoneLoader constructor, "
"expects isc.datasrc.DataSourceClient, isc.dns.Name, "
"and either a string or another DataSourceClient");
return (-1);
}
PyErr_Clear();
......@@ -145,8 +149,7 @@ ZoneLoader_loadIncremental(PyObject* po_self, PyObject* args) {
return (NULL);
}
try {
const bool complete = self->cppobj->loadIncremental(limit);
if (complete) {
if (self->cppobj->loadIncremental(limit)) {
Py_RETURN_TRUE;
} else {
Py_RETURN_FALSE;
......
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