mirror of
https://github.com/python/cpython.git
synced 2026-05-03 00:58:30 +00:00
Correct an ancient bug in an unused path by removing that path: register() is
now idempotent.
This commit is contained in:
parent
469b2a52cd
commit
aa8a96a159
1 changed files with 1 additions and 5 deletions
|
|
@ -29,13 +29,9 @@ def close(self):
|
|||
tk.call("rename", orig, w)
|
||||
|
||||
def register(self, name, function):
|
||||
if self.dict.has_key(name):
|
||||
previous = dict[name]
|
||||
else:
|
||||
previous = OriginalCommand(self, name)
|
||||
self.dict[name] = function
|
||||
setattr(self.widget, name, function)
|
||||
return previous
|
||||
return OriginalCommand(self, name)
|
||||
|
||||
def unregister(self, name):
|
||||
if self.dict.has_key(name):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue