[Python-checkins] r52782 - in python/trunk: Lib/lib-tk/tkSimpleDialog.py Misc/NEWS

martin.v.loewis python-checkins at python.org
Sat Nov 18 19:05:36 CET 2006


Author: martin.v.loewis
Date: Sat Nov 18 19:05:35 2006
New Revision: 52782

Modified:
   python/trunk/Lib/lib-tk/tkSimpleDialog.py
   python/trunk/Misc/NEWS
Log:
Patch #1594554: Always close a tkSimpleDialog on ok(), even
if an exception occurs.
Will backport to 2.5.


Modified: python/trunk/Lib/lib-tk/tkSimpleDialog.py
==============================================================================
--- python/trunk/Lib/lib-tk/tkSimpleDialog.py	(original)
+++ python/trunk/Lib/lib-tk/tkSimpleDialog.py	Sat Nov 18 19:05:35 2006
@@ -129,9 +129,10 @@
         self.withdraw()
         self.update_idletasks()
 
-        self.apply()
-
-        self.cancel()
+        try:
+            self.apply()
+        finally:
+            self.cancel()
 
     def cancel(self, event=None):
 

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sat Nov 18 19:05:35 2006
@@ -98,6 +98,9 @@
 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.
 


More information about the Python-checkins mailing list