summaryrefslogtreecommitdiff
path: root/python/acquire.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-06-29 16:10:40 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-06-29 16:10:40 +0200
commit794e9321c92aab78c3b7123d765967ba67b79851 (patch)
tree9886905374b0ae9bc0043f12be0797c6f8f0af35 /python/acquire.cc
parent43aee9eda68e374067d6d6a9c4dd3c3e9b986041 (diff)
parent6ec2e17ae6712655c1bacffa8c6ecde5f8810960 (diff)
downloadpython-apt-794e9321c92aab78c3b7123d765967ba67b79851.tar.gz
merged from debian-sid
Diffstat (limited to 'python/acquire.cc')
-rw-r--r--python/acquire.cc9
1 files changed, 4 insertions, 5 deletions
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);
}
/**