##// END OF EJS Templates
Don't ignore ctrl-C during normal execution in inputhook_qt4
MinRK -
Show More
@@ -91,7 +91,6 b' def create_inputhook_qt4(mgr, app=None):'
91 timer.start(50)
91 timer.start(50)
92 app.exec_()
92 app.exec_()
93 timer.stop()
93 timer.stop()
94 ignore_CTRL_C()
95 except KeyboardInterrupt:
94 except KeyboardInterrupt:
96 ignore_CTRL_C()
95 ignore_CTRL_C()
97 got_kbdint[0] = True
96 got_kbdint[0] = True
@@ -102,10 +101,13 b' def create_inputhook_qt4(mgr, app=None):'
102 "\n and '%gui qt4' to re-enable it later")
101 "\n and '%gui qt4' to re-enable it later")
103 mgr.clear_inputhook()
102 mgr.clear_inputhook()
104 except: # NO exceptions are allowed to escape from a ctypes callback
103 except: # NO exceptions are allowed to escape from a ctypes callback
104 ignore_CTRL_C()
105 mgr.clear_inputhook()
105 mgr.clear_inputhook()
106 from traceback import print_exc
106 from traceback import print_exc
107 print_exc()
107 print_exc()
108 print("Got exception from inputhook_qt4, unregistering.")
108 print("Got exception from inputhook_qt4, unregistering.")
109 finally:
110 allow_CTRL_C()
109 return 0
111 return 0
110
112
111 def preprompthook_qt4(ishell):
113 def preprompthook_qt4(ishell):
General Comments 0
You need to be logged in to leave comments. Login now