From 18e9800bb962072e79e99f8fb1a29692919596ee Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 Oct 2009 19:06:49 +0100 Subject: * python/progress.cc: - if the mediaChange() does not return anything or is not implemented send "false" to libapt --- python/progress.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'python') diff --git a/python/progress.cc b/python/progress.cc index b3e06b87..82967687 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -104,11 +104,10 @@ bool PyFetchProgress::MediaChange(string Media, string Drive) RunSimpleCallback("mediaChange", arglist, &result); bool res = true; - if(!PyArg_Parse(result, "b", &res)) - std::cerr << "result could not be parsed" << std::endl; - - // FIXME: find out what it should return usually - //std::cerr << "res is: " << res << std::endl; + if(!PyArg_Parse(result, "b", &res)) { + // no return value or None, assume false + return false; + } PyCbObj_BEGIN_ALLOW_THREADS return res; -- cgit v1.2.3