(self)
| 119 | download_container = QtCore.Signal() |
| 120 | |
| 121 | def run(self) -> None: |
| 122 | strategy = installer.get_installation_strategy() |
| 123 | if strategy == InstallationStrategy.INSTALL_LOCAL_CONTAINER: |
| 124 | self.load_container.emit() |
| 125 | return super().run() |
| 126 | elif strategy == InstallationStrategy.INSTALL_REMOTE_CONTAINER: |
| 127 | # Always ask the user if they want to install a remote container image, |
| 128 | # unless: |
| 129 | # 1. The user has strictly specified that they don't want to be prompted |
| 130 | # again. |
| 131 | # 2. The Dangerzone installation has no bundled images and no images that |
| 132 | # Podman has downloaded already. In this particular case, they have |
| 133 | # already been prompted by the `UpdateCheckTask`, so they don't need to |
| 134 | # be prompted again. |
| 135 | ask = Settings().get("updater_ask_before_download") |
| 136 | force = not is_container_tar_bundled() and not runtime.list_image_digests() |
| 137 | if ask and not force: |
| 138 | resp = self.prompt_user() |
| 139 | if not resp: |
| 140 | log.debug("Skipping new container download (asked by the user)") |
| 141 | self._download_container() |
| 142 | |
| 143 | def _download_container(self) -> None: |
| 144 | self.download_container.emit() |
no test coverage detected