| 640 | # shows that the command is able to continue execution if the sigint_handler |
| 641 | # returns True that we've handled interrupting the command. |
| 642 | class SigintHandledCommandSet(cmd2.CommandSet): |
| 643 | def do_foo(self, _) -> None: |
| 644 | """Foo Command""" |
| 645 | self._cmd.poutput("in foo") |
| 646 | self._cmd.sigint_handler(signal.SIGINT, None) |
| 647 | self._cmd.poutput("end of foo") |
| 648 | |
| 649 | def sigint_handler(self) -> bool: |
| 650 | return True |
| 651 | |
| 652 | cs1 = SigintHandledCommandSet() |
| 653 | manual_command_sets_app.register_command_set(cs1) |
no outgoing calls
searching dependent graphs…