summaryrefslogtreecommitdiff
path: root/python/cache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-08-19 16:39:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-08-19 16:39:57 +0200
commitee7b1ef76f58e8dd3a744af98007c4ab8b5ab6d2 (patch)
treeac6b1716b26be9d0884d3577d0809a3e1a947592 /python/cache.cc
parent3774f875be6bbe97b98032b72f3933ed151b35a8 (diff)
downloadpython-apt-ee7b1ef76f58e8dd3a744af98007c4ab8b5ab6d2.tar.gz
* apt/cache.py, python/cache.cc:
- add optional pulseIntevall option to "update()" * po/python-apt.pot: - refreshed
Diffstat (limited to 'python/cache.cc')
-rw-r--r--python/cache.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/cache.cc b/python/cache.cc
index c7e5e76e..f0da8511 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -81,13 +81,14 @@ static PyObject *PkgCacheUpdate(PyObject *Self,PyObject *Args)
PyObject *pyFetchProgressInst = 0;
PyObject *pySourcesList = 0;
- if (PyArg_ParseTuple(Args, "OO", &pyFetchProgressInst,&pySourcesList) == 0)
+ int pulseInterval = 5000;
+ if (PyArg_ParseTuple(Args, "OO|i", &pyFetchProgressInst,&pySourcesList, &pulseInterval) == 0)
return 0;
PyFetchProgress progress;
progress.setCallbackInst(pyFetchProgressInst);
pkgSourceList *source = GetCpp<pkgSourceList*>(pySourcesList);
- bool res = ListUpdate(progress, *source);
+ bool res = ListUpdate(progress, *source, pulseInterval);
PyObject *PyRes = Py_BuildValue("b", res);
return HandleErrors(PyRes);