Skip to content

Commit 5c3edfe

Browse files
Handle Ctrl+Z properly
1 parent f817371 commit 5c3edfe

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/pdb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@ def readline(self):
382382
from _pyrepl.simple_interact import _more_lines
383383

384384
def more_lines(text):
385+
if text.strip() == "\x1a":
386+
# Ctrl + Z raises EOFError to quit pdb
387+
# This is similarly handled in simple_interact.py
388+
raise EOFError
385389
cmd, _, line = self.pdb_instance.parseline(text)
386390
if not line or not cmd:
387391
return False

0 commit comments

Comments
 (0)