mirror of https://github.com/python/cpython
Patch #1121234: Properly cleanup _exit and tkerror commands.
Will backport to 2.4.
This commit is contained in:
parent
5ce2587b1b
commit
4afe154369
|
@ -1599,8 +1599,15 @@ class Tk(Misc, Wm):
|
||||||
raise RuntimeError, \
|
raise RuntimeError, \
|
||||||
"Tk 4.0 or higher is required; found Tk %s" \
|
"Tk 4.0 or higher is required; found Tk %s" \
|
||||||
% str(TkVersion)
|
% str(TkVersion)
|
||||||
|
# Create and register the tkerror and exit commands
|
||||||
|
# We need to inline parts of _register here, _ register
|
||||||
|
# would register differently-named commands.
|
||||||
|
if self._tclCommands is None:
|
||||||
|
self._tclCommands = []
|
||||||
self.tk.createcommand('tkerror', _tkerror)
|
self.tk.createcommand('tkerror', _tkerror)
|
||||||
self.tk.createcommand('exit', _exit)
|
self.tk.createcommand('exit', _exit)
|
||||||
|
self._tclCommands.append('tkerror')
|
||||||
|
self._tclCommands.append('exit')
|
||||||
if _support_default_root and not _default_root:
|
if _support_default_root and not _default_root:
|
||||||
_default_root = self
|
_default_root = self
|
||||||
self.protocol("WM_DELETE_WINDOW", self.destroy)
|
self.protocol("WM_DELETE_WINDOW", self.destroy)
|
||||||
|
|
|
@ -59,6 +59,8 @@ Extension Modules
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Patch #1121234: Properly cleanup _exit and tkerror commands.
|
||||||
|
|
||||||
- Patch #1049151: xdrlib now unpacks booleans as True or False.
|
- Patch #1049151: xdrlib now unpacks booleans as True or False.
|
||||||
|
|
||||||
- Fixed bug in a NameError bug in cookielib. Patch #1116583.
|
- Fixed bug in a NameError bug in cookielib. Patch #1116583.
|
||||||
|
|
Loading…
Reference in New Issue