summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-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;