From e0bc5dab9906496b435360bb8dd19c34ce16ec37 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sat, 20 Mar 2010 02:12:35 +0000 Subject: [PATCH] Merged revisions 78988 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ........ r78988 | matthias.klose | 2010-03-16 11:48:52 +0100 (Di, 16 Mär 2010) | 3 lines - Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox with Tcl/Tk-8.5. ........ --- Lib/lib-tk/tkMessageBox.py | 8 +++++--- Misc/NEWS | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Lib/lib-tk/tkMessageBox.py b/Lib/lib-tk/tkMessageBox.py index d14ca86feb..9ee923576f 100644 --- a/Lib/lib-tk/tkMessageBox.py +++ b/Lib/lib-tk/tkMessageBox.py @@ -70,11 +70,13 @@ def _show(title=None, message=None, _icon=None, _type=None, **options): if title: options["title"] = title if message: options["message"] = message res = Message(**options).show() - # In some Tcl installations, Tcl converts yes/no into a boolean + # In some Tcl installations, yes/no is converted into a boolean. if isinstance(res, bool): - if res: return YES + if res: + return YES return NO - return res + # In others we get a Tcl_Obj. + return str(res) def showinfo(title=None, message=None, **options): "Show an info message" diff --git a/Misc/NEWS b/Misc/NEWS index b0c59011b0..1fbf7c1cfb 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -15,6 +15,9 @@ Core and Builtins Library ------- +- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox + with Tcl/Tk-8.5. + - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the locale. -- 2.50.1