summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorTian Gao <gaogaotiantian@hotmail.com>2024-06-19 22:50:26 (GMT)
committerGitHub <noreply@github.com>2024-06-19 22:50:26 (GMT)
commit4bbb0273f23c93ee82d7f60067775c558a7d1b1b (patch)
tree364a7ecbd42a3018d4a68463c21bebf3e23ad5dc /Lib/pdb.py
parent1e4815692f6c8a37a3974d0d7d2025494d026d76 (diff)
downloadcpython-4bbb0273f23c93ee82d7f60067775c558a7d1b1b.zip
cpython-4bbb0273f23c93ee82d7f60067775c558a7d1b1b.tar.gz
cpython-4bbb0273f23c93ee82d7f60067775c558a7d1b1b.tar.bz2
gh-120606: Allow EOF to exit pdb commands definition (#120607)
Diffstat (limited to 'Lib/pdb.py')
-rw-r--r--Lib/pdb.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index ddbfb9d..b1be207 100644
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -860,6 +860,9 @@ class Pdb(bdb.Bdb, cmd.Cmd):
return False # continue to handle other cmd def in the cmd list
elif cmd == 'end':
return True # end of cmd list
+ elif cmd == 'EOF':
+ print('')
+ return True # end of cmd list
cmdlist = self.commands[self.commands_bnum]
if arg:
cmdlist.append(cmd+' '+arg)