diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-08-14 14:58:25 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-08-14 14:58:25 +0200 |
| commit | c1ad8a0fbc0adfebdb847f28da92b3d5a1f90582 (patch) | |
| tree | 80225148a1c1d0d4283fb76e827c6ccc9ca206bf /python/acquire.cc | |
| parent | c736d5c9290a2ffdb8802a4ac62e521cf1218b54 (diff) | |
| parent | dfd6bacface878eecf3fec4876bdae2f0491a646 (diff) | |
| download | python-apt-c1ad8a0fbc0adfebdb847f28da92b3d5a1f90582.tar.gz | |
merged from the debian-sid tree
Diffstat (limited to 'python/acquire.cc')
| -rw-r--r-- | python/acquire.cc | 9 |
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); } /** |
