mirror of https://github.com/python/cpython
Close #13500: Hitting EOF gets cmd.py into a infinite EOF on return loop
This commit is contained in:
parent
9a38863d8c
commit
a94b578431
|
@ -209,6 +209,8 @@ class Cmd:
|
||||||
if cmd is None:
|
if cmd is None:
|
||||||
return self.default(line)
|
return self.default(line)
|
||||||
self.lastcmd = line
|
self.lastcmd = line
|
||||||
|
if line == 'EOF' :
|
||||||
|
self.lastcmd = ''
|
||||||
if cmd == '':
|
if cmd == '':
|
||||||
return self.default(line)
|
return self.default(line)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue