Skip to content

Commit

Permalink
FIXUP: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
apyrgio committed Dec 4, 2024
1 parent bd72b6a commit 767617d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
30 changes: 17 additions & 13 deletions dangerzone/container_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import subprocess
from typing import List, Tuple

from .util import get_resource_path, get_subprocess_startupinfo
from . import errors
from .util import get_resource_path, get_subprocess_startupinfo

CONTAINER_NAME = "dangerzone.rocks/dangerzone"

Expand Down Expand Up @@ -78,18 +78,22 @@ def list_image_tags() -> List[str]:
images. This can be useful when we want to find which are the local image tags,
and which image ID does the "latest" tag point to.
"""
return subprocess.check_output(
[
get_runtime(),
"image",
"list",
"--format",
"{{ .Tag }}",
CONTAINER_NAME,
],
text=True,
startupinfo=get_subprocess_startupinfo(),
).strip().split()
return (
subprocess.check_output(
[
get_runtime(),
"image",
"list",
"--format",
"{{ .Tag }}",
CONTAINER_NAME,
],
text=True,
startupinfo=get_subprocess_startupinfo(),
)
.strip()
.split()
)


def delete_image_tag(tag: str) -> None:
Expand Down
4 changes: 3 additions & 1 deletion dangerzone/isolation_provider/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ def exec_container(
enable_stdin = ["-i"]
set_name = ["--name", name]
prevent_leakage_args = ["--rm"]
image_name = [container_utils.CONTAINER_NAME + ":" + container_utils.get_expected_tag()]
image_name = [
container_utils.CONTAINER_NAME + ":" + container_utils.get_expected_tag()
]
args = (
["run"]
+ security_args
Expand Down

0 comments on commit 767617d

Please sign in to comment.