From 0a8598b3b728e0445f84186b3f302734d1347371 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 28 Nov 2005 12:27:33 +0000 Subject: * rewrote the cache.commit() code to make use of the new pkgAcquire/pkgPackageManager interface --- python/acquire.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'python/acquire.cc') 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(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"}, {} }; -- cgit v1.2.3