[Python-checkins] cpython (2.7): Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop

jesus.cea python-checkins at python.org
Tue Dec 6 20:47:51 CET 2011


http://hg.python.org/cpython/rev/5910c385fab6
changeset:   73872:5910c385fab6
branch:      2.7
parent:      73870:6d1a91e9f506
user:        Jesus Cea <jcea at jcea.es>
date:        Tue Dec 06 20:46:04 2011 +0100
summary:
  Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop

files:
  Lib/cmd.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Lib/cmd.py b/Lib/cmd.py
--- a/Lib/cmd.py
+++ b/Lib/cmd.py
@@ -209,6 +209,8 @@
         if cmd is None:
             return self.default(line)
         self.lastcmd = line
+        if line == 'EOF' :
+            self.lastcmd = ''
         if cmd == '':
             return self.default(line)
         else:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list