summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/WidgetRedirector.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/idlelib/WidgetRedirector.py b/Lib/idlelib/WidgetRedirector.py
index df60cea..f941cc2 100644
--- a/Lib/idlelib/WidgetRedirector.py
+++ b/Lib/idlelib/WidgetRedirector.py
@@ -29,13 +29,9 @@ class WidgetRedirector:
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):