MCPcopy
hub / github.com/freedomofpress/dangerzone / run

Method run

dangerzone/gui/startup.py:121–141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers 6

installFunction · 0.45
updateFunction · 0.45
exec_containerMethod · 0.45
wrapperFunction · 0.45
_download_containerMethod · 0.45

Calls 6

prompt_userMethod · 0.95
_download_containerMethod · 0.95
SettingsClass · 0.85
is_container_tar_bundledFunction · 0.85
emitMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected