diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-11-28 12:27:33 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-11-28 12:27:33 +0000 |
| commit | 0a8598b3b728e0445f84186b3f302734d1347371 (patch) | |
| tree | 0ab2b3b2150c76bde502955779905a1b6312efec /python/acquire.cc | |
| parent | f505ecbf86d6ab30208c579a5e25c819c3733d89 (diff) | |
| download | python-apt-0a8598b3b728e0445f84186b3f302734d1347371.tar.gz | |
* rewrote the cache.commit() code to make use of the new pkgAcquire/pkgPackageManager interface
Diffstat (limited to 'python/acquire.cc')
| -rw-r--r-- | python/acquire.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/acquire.cc b/python/acquire.cc index 1bbed72a..2bcd94c1 100644 --- a/python/acquire.cc +++ b/python/acquire.cc @@ -94,11 +94,11 @@ static PyObject *PkgAcquireRun(PyObject *Self,PyObject *Args) { pkgAcquire *fetcher = GetCpp<pkgAcquire*>(Self); - if (PyArg_ParseTuple(Args, "") == 0) + int pulseInterval = 500000; + if (PyArg_ParseTuple(Args, "|i", &pulseInterval) == 0) return 0; - //FIXME: add pulse interval here - pkgAcquire::RunResult run = fetcher->Run(); + pkgAcquire::RunResult run = fetcher->Run(pulseInterval); return HandleErrors(Py_BuildValue("i",run)); } @@ -119,6 +119,7 @@ static PyObject *PkgAcquireShutdown(PyObject *Self,PyObject *Args) static PyMethodDef PkgAcquireMethods[] = { {"Run",PkgAcquireRun,METH_VARARGS,"Run the fetcher"}, + {"Shutdown",PkgAcquireShutdown, METH_VARARGS,"Shutdown the fetcher"}, {} }; |
