Stop the puppet.
(self)
| 522 | def _on_launch_clicked(self, button): |
| 523 | """Handle launch button click.""" |
| 524 | if self.launcher.is_running(): |
| 525 | self._stop_puppet() |
| 526 | else: |
| 527 | self._launch_puppet() |
| 528 | |
| 529 | def _launch_puppet(self): |
| 530 | """Launch the puppet.""" |
| 531 | if not os.path.isdir(self.launcher.webview_path): |
| 532 | self._download_viewer() |
| 533 | return |
| 534 | |
| 535 | # Get selected model |
| 536 | model_name = self.model_dropdown.get_selected_item() |
| 537 | if not model_name: |
| 538 | self._show_status("Please select a model first", "error") |
| 539 | return |
| 540 | |
| 541 | model_path = self._model_paths.get(model_name.get_string()) |
| 542 | if not model_path: |
| 543 | self._show_status("Invalid model selected", "error") |
| 544 | return |
| 545 |
no test coverage detected