summaryrefslogtreecommitdiff
path: root/python/progress.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-16 20:00:27 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-16 20:00:27 +0200
commit007fd304fe99b0d97b8039a8c1a83ac749e876f9 (patch)
tree485f25d0e27a7ba40a4c0103c61ed665c0c7f54b /python/progress.cc
parent307a9f815c8d0344619c044d2d59eacdbebc25f3 (diff)
downloadpython-apt-007fd304fe99b0d97b8039a8c1a83ac749e876f9.tar.gz
python/progress.cc: Call fail() on AcquireProgress objects.
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;