Skip to content

Commit

Permalink
FIXUP: Change the error message and use setPlainText
Browse files Browse the repository at this point in the history
  • Loading branch information
almet committed Sep 2, 2024
1 parent 532fd74 commit c073a78
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions dangerzone/gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,16 +522,13 @@ def state_change(self, state: str, error: str) -> None:
self.buttons.show()
elif state == "not_running":
if platform.system() == "Linux":
# "not_running" here means that the `podman image ls` command failed.
message = (
"<strong>Dangerzone requires Podman</strong><br><br>"
"Podman is installed but isn't running.<br>"
"It could mean that it is not configured properly."
"Podman is installed but cannot run properly. See errors below"
)
if error:
message += "<br><br>The following error was caught when trying to run <code>podman image list</code>"

code_snippet = f"<pre>{error.decode()}</pre>"
self.error_text.setHtml(code_snippet)
self.error_text.setPlainText(error.decode())
self.error_text.setVisible(True)

self.label.setText(message)
Expand Down

0 comments on commit c073a78

Please sign in to comment.