mirror of
https://github.com/python/cpython.git
synced 2025-08-19 16:20:59 +00:00
Patch #1594554: Always close a tkSimpleDialog on ok(), even
if an exception occurs.
This commit is contained in:
parent
ce9212f018
commit
e350c840b3
2 changed files with 7 additions and 3 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue