Exit with 2 ^C in 2 seconds

This commit is contained in:
Paul Gauthier 2023-07-20 11:14:24 -03:00
parent 842ea95de2
commit d6a4b24306

View file

@ -403,7 +403,7 @@ class Coder:
def keyboard_interrupt(self): def keyboard_interrupt(self):
now = time.time() now = time.time()
thresh = 3 # seconds thresh = 2 # seconds
if self.last_keyboard_interrupt and now - self.last_keyboard_interrupt < thresh: if self.last_keyboard_interrupt and now - self.last_keyboard_interrupt < thresh:
self.io.tool_error("\n\n^C KeyboardInterrupt") self.io.tool_error("\n\n^C KeyboardInterrupt")
sys.exit() sys.exit()