]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Convert bool results back to strings. Fixes #807871.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Sep 2004 16:04:21 +0000 (16:04 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Sep 2004 16:04:21 +0000 (16:04 +0000)
Lib/lib-tk/tkMessageBox.py
Misc/NEWS

index c2aa9282a7d15ba89b809c921365cb940e44ddfd..8c94677a0772f9cd8cba23bb6d1574f419ba1a05 100644 (file)
@@ -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"
index cabbeda4fd79cfbdac8b0a5fc0b7f69291a0e86f..a5b2a5ff32ea973a5ceddb811557fac289477e3b 100644 (file)
--- 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.