summaryrefslogtreecommitdiff
path: root/Lib/tkinter/messagebox.py
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2010-03-16 10:53:02 +0000
committerMatthias Klose <doko@ubuntu.com>2010-03-16 10:53:02 +0000
commitbc1b95f18e986eba75aa9caca5d043eaf3b75c4b (patch)
treefccd4bf41e3ba8b44eda2ed27459f8984881c663 /Lib/tkinter/messagebox.py
parent4d330e46f8c1751f4f2f9ded0f2be6d8c486fa9c (diff)
downloadcpython-bc1b95f18e986eba75aa9caca5d043eaf3b75c4b.tar.gz
Merged revisions 78989 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78989 | matthias.klose | 2010-03-16 11:51:28 +0100 (Tue, 16 Mar 2010) | 10 lines Merged revisions 78988 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78988 | matthias.klose | 2010-03-16 11:48:52 +0100 (Tue, 16 Mar 2010) | 3 lines - Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox with Tcl/Tk-8.5. ........ ................
Diffstat (limited to 'Lib/tkinter/messagebox.py')
-rw-r--r--Lib/tkinter/messagebox.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/tkinter/messagebox.py b/Lib/tkinter/messagebox.py
index c9349567f8..5c35d5adba 100644
--- a/Lib/tkinter/messagebox.py
+++ b/Lib/tkinter/messagebox.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"