diff options
author | Matthias Klose <doko@ubuntu.com> | 2010-03-16 10:48:52 +0000 |
---|---|---|
committer | Matthias Klose <doko@ubuntu.com> | 2010-03-16 10:48:52 +0000 |
commit | 8b41168bab1ef241b63aba52528df63503970235 (patch) | |
tree | 51571066395d3063c2c037502c2eb5815716fcc9 /Lib/lib-tk/tkMessageBox.py | |
parent | 3cc8f211ed0d569836114d0d54c6298a21e6dde3 (diff) | |
download | cpython-git-8b41168bab1ef241b63aba52528df63503970235.tar.gz |
- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
with Tcl/Tk-8.5.
Diffstat (limited to 'Lib/lib-tk/tkMessageBox.py')
-rw-r--r-- | Lib/lib-tk/tkMessageBox.py | 8 |
1 files changed, 5 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" |