diff options
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"}, {} }; |
