Commit c612681b authored by Guido van Rossum's avatar Guido van Rossum

Fix another bug in ESR's changes. In order to work properly,

onecmd(line) must return the value returned by emptyline() or
default(line).
parent d623d20e
...@@ -91,11 +91,9 @@ class Cmd: ...@@ -91,11 +91,9 @@ class Cmd:
if hasattr(self, 'do_shell'): if hasattr(self, 'do_shell'):
line = 'shell' line = 'shell'
else: else:
self.default(line) return self.default(line)
return
elif not line: elif not line:
self.emptyline() return self.emptyline()
return
self.lastcmd = line self.lastcmd = line
i, n = 0, len(line) i, n = 0, len(line)
while i < n and line[i] in self.identchars: i = i+1 while i < n and line[i] in self.identchars: i = i+1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment