]> granicus.if.org Git - python/commitdiff
Fix another bug in ESR's changes. In order to work properly,
authorGuido van Rossum <guido@python.org>
Mon, 20 Jul 1998 21:22:08 +0000 (21:22 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 20 Jul 1998 21:22:08 +0000 (21:22 +0000)
onecmd(line) must return the value returned by emptyline() or
default(line).

Lib/cmd.py

index 508c4dedf745d9b3c8a55ec96a16e613cf104b30..35b9e0b1fc6e97337ed831c03d979d98ae4dd2cf 100644 (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