(self)
| 984 | return inp |
| 985 | |
| 986 | def keyboard_interrupt(self): |
| 987 | # Ensure cursor is visible on exit |
| 988 | Console().show_cursor(True) |
| 989 | |
| 990 | now = time.time() |
| 991 | |
| 992 | thresh = 2 # seconds |
| 993 | if self.last_keyboard_interrupt and now - self.last_keyboard_interrupt < thresh: |
| 994 | self.io.tool_warning("\n\n^C KeyboardInterrupt") |
| 995 | self.event("exit", reason="Control-C") |
| 996 | sys.exit() |
| 997 | |
| 998 | self.io.tool_warning("\n\n^C again to exit") |
| 999 | |
| 1000 | self.last_keyboard_interrupt = now |
| 1001 | |
| 1002 | def summarize_start(self): |
| 1003 | if not self.summarizer.too_big(self.done_messages): |
no test coverage detected