summaryrefslogtreecommitdiff
path: root/python/pkgmanager.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/pkgmanager.cc
parentee15a84128199c2ef23afcf88dbc2f02df08adcc (diff)
downloadpython-apt-c3d6edddcdcd40ff7477430a20a3e3be7e188963.tar.gz
python: Return bool instead of int to Python where possible, looks better.
Diffstat (limited to 'python/pkgmanager.cc')
-rw-r--r--python/pkgmanager.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc
index 2fda14ee..3a40655a 100644
--- a/python/pkgmanager.cc
+++ b/python/pkgmanager.cc
@@ -65,7 +65,7 @@ static PyObject *PkgManagerGetArchives(PyObject *Self,PyObject *Args)
bool res = pm->GetArchives(s_fetcher, s_list,
&s_records.Records);
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors(PyBool_FromLong(res));
}
static PyObject *PkgManagerDoInstall(PyObject *Self,PyObject *Args)
@@ -92,7 +92,7 @@ static PyObject *PkgManagerFixMissing(PyObject *Self,PyObject *Args)
bool res = pm->FixMissing();
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors(PyBool_FromLong(res));
}
static PyMethodDef PkgManagerMethods[] =