From 34503feab88a8aa72ef511f86375933a4d8707ef Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 15 Aug 2008 10:02:54 +0200 Subject: * python/progress.cc: - when pulse() does not return a boolean assume "true" (thanks to Martin Pitt for telling me about the problem) --- python/progress.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'python/progress.cc') diff --git a/python/progress.cc b/python/progress.cc index 793265db..99ad0a25 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -185,8 +185,10 @@ bool PyFetchProgress::Pulse(pkgAcquire * Owner) bool res = true; if(!PyArg_Parse(result, "b", &res)) { - // mvo: this is harmless, we shouldn't print anything here - //std::cerr << "result could not be parsed" << std::endl; + // most of the time the user who subclasses the pulse() + // method forgot to add a return {True,False} so we just + // assume he wants a True + return true; } // fetching can be canceld by returning false -- cgit v1.2.3