diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-09-18 14:43:26 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-09-18 14:43:26 +0200 |
| commit | 17e8b974718928e8e5a1b80ac2c45e6f7ff98441 (patch) | |
| tree | 3c9a3d0c3495b024f9f8fe788c6598b939413ca3 /python | |
| parent | 6f6671a3375128c075a20927b58ad9d7b4bbb543 (diff) | |
| parent | d44831bb1d10ac1bc29690fd226209fb71b91b42 (diff) | |
| download | python-apt-17e8b974718928e8e5a1b80ac2c45e6f7ff98441.tar.gz | |
* python/progress.cc:
- when pulse() does not return a boolean assume "true"
(thanks to Martin Pitt for telling me about the problem)
* aptsources/__init__.py, aptsources/distinfo.py:
- run apt_pkg.init() when aptsources gets imported and not
the distinfo function
- fix detection of cdrom sources and add test for it
Diffstat (limited to 'python')
| -rw-r--r-- | python/progress.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/progress.cc b/python/progress.cc index 793265db..99ad0a25 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -185,8 +185,10 @@ bool PyFetchProgress::Pulse(pkgAcquire * Owner) bool res = true; if(!PyArg_Parse(result, "b", &res)) { - // mvo: this is harmless, we shouldn't print anything here - //std::cerr << "result could not be parsed" << std::endl; + // most of the time the user who subclasses the pulse() + // method forgot to add a return {True,False} so we just + // assume he wants a True + return true; } // fetching can be canceld by returning false |
