From 4bbf76cfa7a42b0cccd650baf3508cf6cfb14c5a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 29 Mar 2011 09:07:52 +0200 Subject: 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) --- debian/changelog | 6 ++++++ python/progress.cc | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0be3ab65..0aed50d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,11 @@ python-apt (0.7.100.3) UNRELEASED; urgency=low + [ Barry Warsaw ] + * 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) + + [ Michael Vogt ] * python/arfile.cc, apt/debfile.py: - add support for .xz archives * tests/test_debfile.py: 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; } -- cgit v1.2.3