diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-11-18 18:05:57 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-11-18 18:05:57 (GMT) |
commit | e350c840b389f645b25f00f1fa35f6ea1fec03b3 (patch) | |
tree | 63dbfc8e4e619f68aa7c302f144bfb2e17071c76 | |
parent | ce9212f018fbd074aba7a37cef4291ebd2e428d4 (diff) | |
download | cpython-e350c840b389f645b25f00f1fa35f6ea1fec03b3.zip cpython-e350c840b389f645b25f00f1fa35f6ea1fec03b3.tar.gz cpython-e350c840b389f645b25f00f1fa35f6ea1fec03b3.tar.bz2 |
Patch #1594554: Always close a tkSimpleDialog on ok(), even
if an exception occurs.
-rw-r--r-- | Lib/lib-tk/tkSimpleDialog.py | 7 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py index 02ea034..4450484 100644 --- a/Lib/lib-tk/tkSimpleDialog.py +++ b/Lib/lib-tk/tkSimpleDialog.py @@ -129,9 +129,10 @@ class Dialog(Toplevel): self.withdraw() self.update_idletasks() - self.apply() - - self.cancel() + try: + self.apply() + finally: + self.cancel() def cancel(self, event=None): @@ -103,6 +103,9 @@ Extension Modules Library ------- +- Patch #1594554: Always close a tkSimpleDialog on ok(), even + if an exception occurs. + - Patch #1538878: Don't make tkSimpleDialog dialogs transient if the parent window is withdrawn. |