Skip to content

Commit

Permalink
Fix image SCP when not providing quiet
Browse files Browse the repository at this point in the history
Due to a logic error when trying to use the image scp functionality the
destination wasn't passed unless "quiet" was also set.

Signed-off-by: Hein-Pieter van Braam <[email protected]>
  • Loading branch information
hpvb committed Sep 3, 2023
1 parent c8abef1 commit b6cb03b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions podman/domain/images_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,11 @@ def scp(
APIError: when service returns an error
"""
params = {}
if dest is not None and quiet:
params = {"destination": dest, "quiet": quiet}
elif quiet:
params = {"quiet": quiet}
if dest is not None:
params["destination"] = dest
if quiet:
params["quiet"] = quiet

response = self.client.post(f"/images/scp/{source}", params=params)
response.raise_for_status()
return response.json()

0 comments on commit b6cb03b

Please sign in to comment.