summaryrefslogtreecommitdiff
path: root/python/cache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-03-09 16:16:37 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-03-09 16:16:37 +0000
commit59902bad90ed9192ad9b2def78f588cdefe1080c (patch)
tree859896b89dc8a332c8c39d0960eb3f59128e465e /python/cache.cc
parent6d42024c88d207c35718f4f8458e58fc44951830 (diff)
downloadpython-apt-59902bad90ed9192ad9b2def78f588cdefe1080c.tar.gz
* Implemented OpProgress support
Diffstat (limited to 'python/cache.cc')
-rw-r--r--python/cache.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/python/cache.cc b/python/cache.cc
index ceffba20..7ba53fd9 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -744,15 +744,13 @@ PyObject *TmpGetCache(PyObject *Self,PyObject *Args)
{
pkgCacheFile *Cache = new pkgCacheFile();
- PyObject *pyCallbackObj = 0;
- PyObject *pyCallbackArgs = 0;
- if (PyArg_ParseTuple(Args, "|OO", &pyCallbackObj, &pyCallbackArgs) == 0)
+ PyObject *pyCallbackInst = 0;
+ if (PyArg_ParseTuple(Args, "|O", &pyCallbackInst) == 0)
return 0;
- if(pyCallbackObj != 0) {
- PyOpProgressStruct progress;
- progress.py_update_callback_func = pyCallbackObj;
- progress.py_update_callback_args = pyCallbackArgs;
+ if(pyCallbackInst != 0) {
+ PyOpProgress progress;
+ progress.setCallbackInst(pyCallbackInst);
if (Cache->Open(progress,false) == false)
return HandleErrors();
} else {