diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-08-21 15:42:08 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-08-21 15:42:08 +0200 |
| commit | 1eac1b0ebdbbe46bc86d692ed5c94b841b605bd6 (patch) | |
| tree | 41f6999ef65bf92a426400c18911482a3df37359 /python/cache.cc | |
| parent | 1783164e02154a748a225efa51d22205b7d75261 (diff) | |
| parent | ee7b1ef76f58e8dd3a744af98007c4ab8b5ab6d2 (diff) | |
| download | python-apt-1eac1b0ebdbbe46bc86d692ed5c94b841b605bd6.tar.gz | |
apt/cache.py, python/cache.cc: add optional pulseInterval option to "update()".
Diffstat (limited to 'python/cache.cc')
| -rw-r--r-- | python/cache.cc | 5 |
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); |
