summaryrefslogtreecommitdiffstats
path: root/Lib/_pyrepl
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-04 18:45:22 (GMT)
committerGitHub <noreply@github.com>2024-06-04 18:45:22 (GMT)
commit93b95e91faa17520f2042b4f4ae88379df914666 (patch)
tree7bff77928754014c6e809cad7ca017c44cb58652 /Lib/_pyrepl
parentfd5428d2d19f79e439d04aec7a33a00eb17bef7c (diff)
downloadcpython-93b95e91faa17520f2042b4f4ae88379df914666.zip
cpython-93b95e91faa17520f2042b4f4ae88379df914666.tar.gz
cpython-93b95e91faa17520f2042b4f4ae88379df914666.tar.bz2
[3.13] gh-119553: Clear reader on Ctrl-C command (GH-119801) (#120062)
(cherry picked from commit 010ea93b2b888149561becefeee90826bf8a2934) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/_pyrepl')
-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 2ef5dad..e94e8c25 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