FIXUP: Formatting

This commit is contained in:
Alex Pyrgiotis 2024-12-04 18:14:23 +02:00
parent bd72b6a93b
commit 767617d21c
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
2 changed files with 20 additions and 14 deletions

View file

@ -5,8 +5,8 @@ import shutil
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"
@ -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:

View file

@ -171,7 +171,9 @@ class Container(IsolationProvider):
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