[Python-checkins] python/dist/src/Lib/lib-tk tkMessageBox.py, 1.2,
1.3
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Sat Sep 18 18:01:26 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21221/Lib/lib-tk
Modified Files:
tkMessageBox.py
Log Message:
Convert boolean results back to strings. Fixes #807871.
Will backport to 2.3.
Index: tkMessageBox.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkMessageBox.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tkMessageBox.py 6 Apr 2003 09:00:54 -0000 1.2
+++ tkMessageBox.py 18 Sep 2004 16:01:23 -0000 1.3
@@ -72,7 +72,12 @@
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"
More information about the Python-checkins
mailing list