diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2024-06-04 19:46:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 19:46:33 +0200 |
commit | 010ea93b2b888149561becefeee90826bf8a2934 (patch) | |
tree | c2b2880daf54cefcfc885cb7843df7e2daefd3f3 /Lib/_pyrepl/commands.py | |
parent | d419d468ff4aaf6bc673354d0ee41b273d09dd3f (diff) | |
download | cpython-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.py | 1 |
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 |