summaryrefslogtreecommitdiff
path: root/python/sourcelist.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-04-01 18:26:37 +0200
committerJulian Andres Klode <jak@debian.org>2010-04-01 18:26:37 +0200
commitc3d6edddcdcd40ff7477430a20a3e3be7e188963 (patch)
tree71744f04bebd432c7ff54fa89b4f116550041d5d /python/sourcelist.cc
parentee15a84128199c2ef23afcf88dbc2f02df08adcc (diff)
downloadpython-apt-c3d6edddcdcd40ff7477430a20a3e3be7e188963.tar.gz
python: Return bool instead of int to Python where possible, looks better.
Diffstat (limited to 'python/sourcelist.cc')
-rw-r--r--python/sourcelist.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/sourcelist.cc b/python/sourcelist.cc
index 6184fee3..e42f6bb8 100644
--- a/python/sourcelist.cc
+++ b/python/sourcelist.cc
@@ -53,7 +53,7 @@ static PyObject *PkgSourceListReadMainList(PyObject *Self,PyObject *Args)
pkgSourceList *list = GetCpp<pkgSourceList*>(Self);
bool res = list->ReadMainList();
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors(PyBool_FromLong(res));
}
static char *doc_PkgSourceListGetIndexes = "Load the indexes into the fetcher";
@@ -69,7 +69,7 @@ static PyObject *PkgSourceListGetIndexes(PyObject *Self,PyObject *Args)
pkgAcquire *fetcher = GetCpp<pkgAcquire*>(pyFetcher);
bool res = list->GetIndexes(fetcher, all);
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors(PyBool_FromLong(res));
}
static PyMethodDef PkgSourceListMethods[] =