[accerciser/gnome-3-34] IPython: fixed buffer reset in case of KeyboardInterrupt
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser/gnome-3-34] IPython: fixed buffer reset in case of KeyboardInterrupt
- Date: Fri, 24 Apr 2020 21:05:55 +0000 (UTC)
commit 728c9d9d1b7bb3afb816ae69d4492ce04131087f
Author: Rok Mandeljc <rok mandeljc gmail com>
Date: Thu Apr 16 20:35:06 2020 +0200
IPython: fixed buffer reset in case of KeyboardInterrupt
Do not try to call a reset() on input_splitter when input splitter
is not used; clear our internal buffer instead.
plugins/ipython_view.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plugins/ipython_view.py b/plugins/ipython_view.py
index 23b1553..c8f6a71 100755
--- a/plugins/ipython_view.py
+++ b/plugins/ipython_view.py
@@ -179,7 +179,10 @@ class IterableIPShell:
line = self.IP.raw_input(self.prompt)
except KeyboardInterrupt:
self.IP.write('\nKeyboardInterrupt\n')
- self.IP.input_splitter.reset()
+ if self.no_input_splitter:
+ self.lines = []
+ else:
+ self.IP.input_splitter.reset()
except:
self.IP.showtraceback()
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]