From: Jesus Cea Date: Tue, 6 Dec 2011 19:46:57 +0000 (+0100) Subject: Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop X-Git-Tag: v3.2.3rc1~307 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9837d819458b379512771a1e02f7ea02244e813;p=thirdparty%2FPython%2Fcpython.git Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop --- diff --git a/Lib/cmd.py b/Lib/cmd.py index 8fa7d019b550..859e91096d8f 100644 --- a/Lib/cmd.py +++ b/Lib/cmd.py @@ -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: