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

onecmd(line) must return the value returned by emptyline() or
default(line).
This commit is contained in:
Guido van Rossum 1998-07-20 21:22:08 +00:00
parent d623d20e7d
commit c612681b20
1 changed files with 2 additions and 4 deletions

View File

@ -91,11 +91,9 @@ class Cmd:
if hasattr(self, 'do_shell'):
line = 'shell'
else:
self.default(line)
return
return self.default(line)
elif not line:
self.emptyline()
return
return self.emptyline()
self.lastcmd = line
i, n = 0, len(line)
while i < n and line[i] in self.identchars: i = i+1