summaryrefslogtreecommitdiff
path: root/python/apt_instmodule.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-06-29 11:02:42 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-06-29 11:02:42 +0200
commitcdaebccd5f7a5a0e23a9be7989b64850fabafed1 (patch)
tree52d3bd94c02ae9be75fb11bfd423043ef10838cc /python/apt_instmodule.cc
parent57624b5df523c0b3a3ebc1741680f283ee1fbbcd (diff)
parent340f6a3d54f5705801267f365fb08b5d20228fe6 (diff)
downloadpython-apt-cdaebccd5f7a5a0e23a9be7989b64850fabafed1.tar.gz
merged from debian-sid
Diffstat (limited to 'python/apt_instmodule.cc')
-rw-r--r--python/apt_instmodule.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/apt_instmodule.cc b/python/apt_instmodule.cc
index 2721509e..732f1bd0 100644
--- a/python/apt_instmodule.cc
+++ b/python/apt_instmodule.cc
@@ -102,7 +102,7 @@ static PyObject *debExtractArchive(PyObject *Self,PyObject *Args)
if (_error->PendingError() == true) {
if (Rootdir != NULL)
chdir (cwd);
- return HandleErrors(Py_BuildValue("b",false));
+ return HandleErrors();
}
// extracts relative to the current dir
@@ -112,9 +112,9 @@ static PyObject *debExtractArchive(PyObject *Self,PyObject *Args)
if (Rootdir != NULL)
chdir (cwd);
if (res == false)
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors(PyBool_FromLong(res));
}
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors(PyBool_FromLong(res));
}
/*}}}*/
// arFindMember - Find member in AR archive /*{{{*/
@@ -136,12 +136,12 @@ static PyObject *arCheckMember(PyObject *Self,PyObject *Args)
FileFd Fd(fileno,false);
ARArchive AR(Fd);
if (_error->PendingError() == true)
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors();
if(AR.FindMember(Member) != 0)
res = true;
- return HandleErrors(Py_BuildValue("b",res));
+ return HandleErrors(PyBool_FromLong(res));
}
/*}}}*/
@@ -168,7 +168,7 @@ static PyMethodDef *methods = 0;
static const char *apt_inst_doc =
- "Functions for working with AR,tar archives and .deb packages.\n\n"
+ "Functions for working with ar/tar archives and .deb packages.\n\n"
"This module provides useful classes and functions to work with\n"
"archives, modelled after the 'TarFile' class in the 'tarfile' module.";
#define ADDTYPE(mod,name,type) { \