summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rw-r--r--python/acquire.cc9
2 files changed, 7 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 771fed36..20bf1b0b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -49,6 +49,9 @@ python-apt (0.8.5) UNRELEASED; urgency=low
a segmentation fault (Closes: #661062)
* python/tag.cc:
- Correctly handle file descriptor 0 aka stdin (Closes: #669458)
+ * python/acquire.cc:
+ - Use pkgAcquire::Setup() to setup the acquire class and handle errors
+ from this (Closes: #629624)
-- Michael Vogt <mvo@debian.org> Tue, 17 Apr 2012 14:09:24 +0200
diff --git a/python/acquire.cc b/python/acquire.cc
index 6169ff40..45b4493c 100644
--- a/python/acquire.cc
+++ b/python/acquire.cc
@@ -328,18 +328,17 @@ static PyObject *PkgAcquireNew(PyTypeObject *type,PyObject *Args,PyObject *kwds)
// FIXME: memleak?
progress = new PyFetchProgress();
progress->setCallbackInst(pyFetchProgressInst);
- fetcher = new pkgAcquire(progress);
- }
- else {
- fetcher = new pkgAcquire();
}
+ fetcher = new pkgAcquire();
+ fetcher->Setup(progress);
+
PyObject *FetcherObj = CppPyObject_NEW<pkgAcquire*>(NULL, type, fetcher);
if (progress != 0)
progress->setPyAcquire(FetcherObj);
// prepare our map of items.
- return FetcherObj;
+ return HandleErrors(FetcherObj);
}
/**