diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-29 09:07:52 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-29 09:07:52 +0200 |
| commit | 4bbf76cfa7a42b0cccd650baf3508cf6cfb14c5a (patch) | |
| tree | c56f9dcaad46218d1a76f32778f4f591ca692136 /python/progress.cc | |
| parent | bb7a6b6a948ee5cd81e68558a8fdb2956bc1049b (diff) | |
| download | python-apt-4bbf76cfa7a42b0cccd650baf3508cf6cfb14c5a.tar.gz | |
PyFetchProgress::Pulse(): When ignoring a false return value from
PyArg_Parse() after running the simple callback pulse(), there can be
an exception on the stack, which must be cleared. (LP: #711225)
Diffstat (limited to 'python/progress.cc')
| -rw-r--r-- | python/progress.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/progress.cc b/python/progress.cc index 437309cf..5700a1b6 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -399,7 +399,9 @@ bool PyFetchProgress::Pulse(pkgAcquire * Owner) { // 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 + // assume he wants a True. There may be a Python exception on the stack + // that must be cleared. + PyErr_Clear(); PyCbObj_BEGIN_ALLOW_THREADS return true; } |
