]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop
authorJesus Cea <jcea@jcea.es>
Tue, 6 Dec 2011 19:46:57 +0000 (20:46 +0100)
committerJesus Cea <jcea@jcea.es>
Tue, 6 Dec 2011 19:46:57 +0000 (20:46 +0100)
Lib/cmd.py

index 8fa7d019b5505ed9bd9f6b810916f3bd6ddb7b64..859e91096d8f57d906c00023ef1a1c0e663178d6 100644 (file)
@@ -205,6 +205,8 @@ class Cmd:
         if cmd is None:
             return self.default(line)
         self.lastcmd = line
+        if line == 'EOF' :
+            self.lastcmd = ''
         if cmd == '':
             return self.default(line)
         else: