From 0051fdbeff5e08248900cf0b8858178a3dceba7b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 31 Mar 2010 17:11:07 +0200 Subject: * python/cache.cc: - Check that 2nd argument to Cache.update() really is a SourceList object. --- python/cache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/cache.cc b/python/cache.cc index 3c9bc785..e2f26dbb 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -90,7 +90,8 @@ static PyObject *PkgCacheUpdate(PyObject *Self,PyObject *Args) PyObject *pyFetchProgressInst = 0; PyObject *pySourcesList = 0; int pulseInterval = 0; - if (PyArg_ParseTuple(Args, "OO|i", &pyFetchProgressInst,&pySourcesList, &pulseInterval) == 0) + if (PyArg_ParseTuple(Args, "OO!|i", &pyFetchProgressInst, + &PySourceList_Type, &pySourcesList, &pulseInterval) == 0) return 0; PyFetchProgress progress; -- cgit v1.2.3