summaryrefslogtreecommitdiff
path: root/python/progress.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-07-06 10:35:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-07-06 10:35:57 +0200
commite94861e437dc544da9bf4a0161a25dedafd93f34 (patch)
tree96fa478e75636b8842a95b3fe849029076b58e5d /python/progress.cc
parent12ba28e618916bdb418d7e0ed2c8e368ead7e625 (diff)
downloadpython-apt-e94861e437dc544da9bf4a0161a25dedafd93f34.tar.gz
* python/progress.cc:
- deal with missing return value from the acquire progress in pulse()
Diffstat (limited to 'python/progress.cc')
-rw-r--r--python/progress.cc5
1 files changed, 4 insertions, 1 deletions
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;