Correct an ancient bug in an unused path by removing that path: register() is

now idempotent.
This commit is contained in:
Kurt B. Kaiser 2007-10-25 22:43:45 +00:00
parent 469b2a52cd
commit aa8a96a159

View file

@ -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):