Show the welcome view when no host is selected.
(self)
| 548 | self.content_nav.push_by_tag("host-editor") |
| 549 | |
| 550 | def _show_welcome_view(self): |
| 551 | """Show the welcome view when no host is selected.""" |
| 552 | if hasattr(self, "content_nav") and self.content_nav: |
| 553 | try: |
| 554 | page = None |
| 555 | if hasattr(self.content_nav, "find_page"): |
| 556 | try: |
| 557 | page = self.content_nav.find_page("welcome") |
| 558 | except Exception: |
| 559 | page = None |
| 560 | if page is None: |
| 561 | try: |
| 562 | pages = self.content_nav.get_pages() |
| 563 | except Exception: |
| 564 | pages = [] |
| 565 | for p in pages: |
| 566 | try: |
| 567 | tag = p.get_tag() if hasattr(p, "get_tag") else getattr(p, "tag", None) |
| 568 | except Exception: |
| 569 | tag = None |
| 570 | if tag == "welcome": |
| 571 | page = p |
| 572 | break |
| 573 | |
| 574 | if page is not None: |
| 575 | self.content_nav.pop_to_page(page) |
| 576 | else: |
| 577 | self.content_nav.push_by_tag("welcome") |
| 578 | except Exception: |
| 579 | try: |
| 580 | self.content_nav.push_by_tag("welcome") |
| 581 | except Exception: |
| 582 | pass |
| 583 | |
| 584 | def _on_host_added(self, host_list, host): |
| 585 | if self.parser: |
no outgoing calls
no test coverage detected