]> granicus.if.org Git - python/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:04 +0000 (20:46 +0100)
committerJesus Cea <jcea@jcea.es>
Tue, 6 Dec 2011 19:46:04 +0000 (20:46 +0100)
Lib/cmd.py

index 29ea4608e70cfdcd0786aafd8c9e00ef480ff6bb..ae7f12ef1811067f8dc6adba8ffba5883331f5e5 100644 (file)
@@ -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: