summaryrefslogtreecommitdiff
path: root/python/progress.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/progress.cc')
-rw-r--r--python/progress.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/progress.cc b/python/progress.cc
index 6f226ef8..450b7654 100644
--- a/python/progress.cc
+++ b/python/progress.cc
@@ -179,6 +179,11 @@ void PyFetchProgress::Done(pkgAcquire::ItemDesc &Itm)
void PyFetchProgress::Fail(pkgAcquire::ItemDesc &Itm)
{
+ if (PyObject_TypeCheck(callbackInst,&PyAcquireProgress_Type)) {
+ RunSimpleCallback("fail", TUPLEIZE(PyAcquireItemDesc_FromCpp(&Itm)));
+ return;
+ }
+
// Ignore certain kinds of transient failures (bad code)
if (Itm.Owner->Status == pkgAcquire::Item::StatIdle)
return;