summaryrefslogtreecommitdiff
path: root/python/apt_pkgmodule.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/apt_pkgmodule.cc
parentee15a84128199c2ef23afcf88dbc2f02df08adcc (diff)
downloadpython-apt-c3d6edddcdcd40ff7477430a20a3e3be7e188963.tar.gz
python: Return bool instead of int to Python where possible, looks better.
Diffstat (limited to 'python/apt_pkgmodule.cc')
-rw-r--r--python/apt_pkgmodule.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index 3d40832b..e2be4f1d 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -432,7 +432,7 @@ static PyObject *PkgSystemLock(PyObject *Self,PyObject *Args)
bool res = _system->Lock();
Py_INCREF(Py_None);
- return HandleErrors(Py_BuildValue("b", res));
+ return HandleErrors(PyBool_FromLong(res));
}
static char *doc_PkgSystemUnLock =
@@ -446,7 +446,7 @@ static PyObject *PkgSystemUnLock(PyObject *Self,PyObject *Args)
bool res = _system->UnLock();
Py_INCREF(Py_None);
- return HandleErrors(Py_BuildValue("b", res));
+ return HandleErrors(PyBool_FromLong(res));
}
/*}}}*/