aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/_pyrepl/commands.py
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2024-06-04 19:46:33 +0200
committerGitHub <noreply@github.com>2024-06-04 19:46:33 +0200
commit010ea93b2b888149561becefeee90826bf8a2934 (patch)
treec2b2880daf54cefcfc885cb7843df7e2daefd3f3 /Lib/_pyrepl/commands.py
parentd419d468ff4aaf6bc673354d0ee41b273d09dd3f (diff)
downloadcpython-010ea93b2b888149561becefeee90826bf8a2934.tar.gz
cpython-010ea93b2b888149561becefeee90826bf8a2934.zip
gh-119553: Clear reader on Ctrl-C command (GH-119801)
Diffstat (limited to 'Lib/_pyrepl/commands.py')
-rw-r--r--Lib/_pyrepl/commands.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/_pyrepl/commands.py b/Lib/_pyrepl/commands.py
index 2ef5dada9d9..e94e8c25d37 100644
--- a/Lib/_pyrepl/commands.py
+++ b/Lib/_pyrepl/commands.py
@@ -221,6 +221,7 @@ class interrupt(FinishCommand):
class ctrl_c(Command):
def do(self) -> None:
+ self.reader.finish()
raise KeyboardInterrupt