From: Jesus Cea Date: Tue, 6 Dec 2011 19:46:04 +0000 (+0100) Subject: Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop X-Git-Tag: v2.7.3rc1~262 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a94b578431725ea50381e7d31ff5580741593398;p=python 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 29ea4608e7..ae7f12ef18 100644 --- a/Lib/cmd.py +++ b/Lib/cmd.py @@ -209,6 +209,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: