From e94861e437dc544da9bf4a0161a25dedafd93f34 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 6 Jul 2010 10:35:57 +0200 Subject: * python/progress.cc: - deal with missing return value from the acquire progress in pulse() --- python/progress.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/progress.cc') diff --git a/python/progress.cc b/python/progress.cc index 9002b3eb..437309cf 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -300,7 +300,10 @@ bool PyFetchProgress::Pulse(pkgAcquire * Owner) Py_INCREF(pyAcquire); if (RunSimpleCallback("pulse", TUPLEIZE(pyAcquire) , &result1)) { - if (result1 != NULL && PyArg_Parse(result1, "b", &res1) && res1 == false) { + if (result1 != NULL && + result1 != Py_None && + PyArg_Parse(result1, "b", &res1) && + res1 == false) { // the user returned a explicit false here, stop PyCbObj_BEGIN_ALLOW_THREADS return false; -- cgit v1.2.3