From 5a24a562fcd2ade5e59948c66fd16ba756d6c811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 18 Sep 2004 16:04:21 +0000 Subject: Convert bool results back to strings. Fixes #807871. --- Lib/lib-tk/tkMessageBox.py | 7 ++++++- Misc/NEWS | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Lib/lib-tk/tkMessageBox.py b/Lib/lib-tk/tkMessageBox.py index c2aa928..8c94677 100644 --- a/Lib/lib-tk/tkMessageBox.py +++ b/Lib/lib-tk/tkMessageBox.py @@ -72,7 +72,12 @@ def _show(title=None, message=None, icon=None, type=None, **options): if type: options["type"] = type if title: options["title"] = title if message: options["message"] = message - return Message(**options).show() + res = Message(**options).show() + # In some Tcl installations, Tcl converts yes/no into a boolean + if isinstance(res, bool): + if res: return YES + return NO + return res def showinfo(title=None, message=None, **options): "Show an info message" diff --git a/Misc/NEWS b/Misc/NEWS index cabbeda..a5b2a5f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -53,6 +53,8 @@ Extension modules Library ------- +- Bug #807871: Fix tkMessageBox.askyesno result. + - Patch #1014992: In tarfile.readline, never return more than a line. - Bug #1013882: Flush bz2 data even if nothing had been written so far. -- cgit v0.12