mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
FIXUP: Use 'load -i'
This commit is contained in:
parent
8ca1357a41
commit
c0ff351a2e
1 changed files with 15 additions and 17 deletions
|
@ -128,23 +128,21 @@ def get_expected_tag() -> str:
|
||||||
def load_image_tarball() -> None:
|
def load_image_tarball() -> None:
|
||||||
log.info("Installing Dangerzone container image...")
|
log.info("Installing Dangerzone container image...")
|
||||||
tarball_path = get_resource_path("container.tar")
|
tarball_path = get_resource_path("container.tar")
|
||||||
with open(tarball_path) as f:
|
try:
|
||||||
try:
|
res = subprocess.run(
|
||||||
res = subprocess.run(
|
[get_runtime(), "load", "-i", tarball_path],
|
||||||
[get_runtime(), "load"],
|
startupinfo=get_subprocess_startupinfo(),
|
||||||
stdin=f,
|
capture_output=True,
|
||||||
startupinfo=get_subprocess_startupinfo(),
|
check=True,
|
||||||
capture_output=True,
|
)
|
||||||
check=True,
|
except subprocess.CalledProcessError as e:
|
||||||
)
|
if e.stderr:
|
||||||
except subprocess.CalledProcessError as e:
|
error = e.stderr.decode()
|
||||||
if e.stderr:
|
else:
|
||||||
error = e.stderr.decode()
|
error = "No output"
|
||||||
else:
|
raise errors.ImageInstallationException(
|
||||||
error = "No output"
|
f"Could not install container image: {error}"
|
||||||
raise errors.ImageInstallationException(
|
)
|
||||||
f"Could not install container image: {error}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Loading an image built with Buildkit in Podman 3.4 messes up its name. The tag
|
# Loading an image built with Buildkit in Podman 3.4 messes up its name. The tag
|
||||||
# somehow becomes the name of the loaded image [1].
|
# somehow becomes the name of the loaded image [1].
|
||||||
|
|
Loading…
Reference in a new issue