[Python-checkins] r52783 - in python/branches/release25-maint: Lib/lib-tk/tkSimpleDialog.py Misc/NEWS

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


Author: martin.v.loewis
Date: Sat Nov 18 19:05:57 2006
New Revision: 52783

Modified:
   python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py
   python/branches/release25-maint/Misc/NEWS
Log:
Patch #1594554: Always close a tkSimpleDialog on ok(), even
if an exception occurs.


Modified: python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py
==============================================================================
--- python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py	(original)
+++ python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py	Sat Nov 18 19:05:57 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/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS	(original)
+++ python/branches/release25-maint/Misc/NEWS	Sat Nov 18 19:05:57 2006
@@ -103,6 +103,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