summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/cache.cc3
-rw-r--r--python/generic.cc5
-rw-r--r--python/indexfile.cc3
-rw-r--r--python/progress.cc1
4 files changed, 6 insertions, 6 deletions
diff --git a/python/cache.cc b/python/cache.cc
index ba620099..87902b1e 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -90,7 +90,8 @@ static PyObject *PkgCacheUpdate(PyObject *Self,PyObject *Args)
PyObject *pyFetchProgressInst = 0;
PyObject *pySourcesList = 0;
int pulseInterval = 0;
- if (PyArg_ParseTuple(Args, "OO|i", &pyFetchProgressInst,&pySourcesList, &pulseInterval) == 0)
+ if (PyArg_ParseTuple(Args, "OO!|i", &pyFetchProgressInst,
+ &PySourceList_Type, &pySourcesList, &pulseInterval) == 0)
return 0;
PyFetchProgress progress;
diff --git a/python/generic.cc b/python/generic.cc
index d08b12c0..0719d1bb 100644
--- a/python/generic.cc
+++ b/python/generic.cc
@@ -31,11 +31,11 @@ PyObject *HandleErrors(PyObject *Res)
Py_DECREF(Res);
}
- std::string Err;
+ string Err;
int errcnt = 0;
while (_error->empty() == false)
{
- std::string Msg;
+ string Msg;
bool Type = _error->PopMessage(Msg);
if (errcnt > 0)
Err.append(", ");
@@ -63,6 +63,7 @@ static PyObject *_PyApt_NewNameForAttribute(const char *attr) {
if (strcasecmp(attr, "ReadPinFile") == 0) return PyString_FromString("read_pinfile");
if (strcasecmp(attr, "SetReInstall") == 0) return PyString_FromString("set_reinstall");
if (strcasecmp(attr, "URI") == 0) return PyString_FromString("uri");
+ if (strcasecmp(attr, "ArchiveURI") == 0) return PyString_FromString("archive_uri");
if (strcasecmp(attr, "MD5Hash") == 0) return PyString_FromString("md5_hash");
if (strcasecmp(attr, "SHA1Hash") == 0) return PyString_FromString("sha1_hash");
if (strcasecmp(attr, "SHA256Hash") == 0) return PyString_FromString("sha256_hash");
diff --git a/python/indexfile.cc b/python/indexfile.cc
index 5e66b06a..c6d0b1cc 100644
--- a/python/indexfile.cc
+++ b/python/indexfile.cc
@@ -28,9 +28,6 @@ static PyObject *IndexFileArchiveURI(PyObject *Self,PyObject *Args)
static PyMethodDef IndexFileMethods[] =
{
{"archive_uri",IndexFileArchiveURI,METH_VARARGS,"Returns the ArchiveURI"},
-#ifdef COMPAT_0_7
- {"ArchiveURI",IndexFileArchiveURI,METH_VARARGS,"Returns the ArchiveURI"},
-#endif
{}
};
diff --git a/python/progress.cc b/python/progress.cc
index 097f06cf..18081690 100644
--- a/python/progress.cc
+++ b/python/progress.cc
@@ -491,6 +491,7 @@ pkgPackageManager::OrderResult PyInstallProgress::Run(pkgPackageManager *pm)
StartUpdate();
+
PyCbObj_END_ALLOW_THREADS
if(PyObject_HasAttrString(callbackInst, "waitChild") ||
PyObject_HasAttrString(callbackInst, "wait_child")) {