summaryrefslogtreecommitdiff
path: root/python/progress.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@jak-laptop>2009-11-07 19:02:49 +0100
committerJulian Andres Klode <jak@jak-laptop>2009-11-07 19:02:49 +0100
commit516f979538c389d02787f758001011017f2e0d27 (patch)
treef60e4e2845734cee93e446940822505437da9ef5 /python/progress.cc
parent34d3e8ac912084adeb2609ef1ff9c3870a5fc947 (diff)
parent18e9800bb962072e79e99f8fb1a29692919596ee (diff)
downloadpython-apt-516f979538c389d02787f758001011017f2e0d27.tar.gz
Merge with mvo:
* po/zh_CN.po: - updated, thanks to Feng Chao * python/progress.cc: - if the mediaChange() does not return anything or is not implemented send "false" to libapt
Diffstat (limited to 'python/progress.cc')
-rw-r--r--python/progress.cc9
1 files changed, 4 insertions, 5 deletions
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;