()
| 599 | self.is_dirty = True |
| 600 | |
| 601 | def undo_add(): |
| 602 | try: |
| 603 | if host in self.parser.config.hosts: |
| 604 | self.parser.config.remove_host(host) |
| 605 | self.is_dirty = self.parser.config.is_dirty() |
| 606 | self.host_list.load_hosts(self.parser.config.hosts) |
| 607 | try: |
| 608 | if not self.parser.config.hosts: |
| 609 | self._set_host_editor_visible(False) |
| 610 | except Exception: |
| 611 | pass |
| 612 | except Exception: |
| 613 | pass |
| 614 | |
| 615 | self._show_undo_toast(_("Host added"), undo_add) |
| 616 | self._set_host_editor_visible(True) |
nothing calls this directly
no test coverage detected