Skip to content

Commit 55adbcc

Browse files
committed
Avoid fallthrough in signal handling
1 parent 2e69667 commit 55adbcc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/pdb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,13 +2632,15 @@ def _read_reply(self):
26322632
case {"signal": str(signal)}:
26332633
if signal == "INT":
26342634
raise KeyboardInterrupt
2635-
elif signal != "EOF":
2635+
elif signal == "EOF":
2636+
raise EOFError
2637+
else:
26362638
self.error(
26372639
f"Received unrecognized signal: {signal}"
26382640
)
26392641
# Our best hope of recovering is to pretend we
26402642
# got an EOF to exit whatever mode we're in.
2641-
raise EOFError
2643+
raise EOFError
26422644
case {
26432645
"complete": {
26442646
"text": str(text),

0 commit comments

Comments
 (0)