(self)
| 3280 | |
| 3281 | @contextmanager |
| 3282 | def _sigint_raises_keyboard_interrupt(self): |
| 3283 | if self.sigint_received: |
| 3284 | # There's a pending unhandled SIGINT. Handle it now. |
| 3285 | self.sigint_received = False |
| 3286 | raise KeyboardInterrupt |
| 3287 | |
| 3288 | try: |
| 3289 | self.raise_on_sigint = True |
| 3290 | yield |
| 3291 | finally: |
| 3292 | self.raise_on_sigint = False |
| 3293 | |
| 3294 | def cmdloop(self): |
| 3295 | with ( |