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 dba9d76
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions podman/domain/images_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,10 @@ def scp(
Raises:
APIError: when service returns an error
"""
params = {}
if dest is not None and quiet:
params = {"destination": dest, "quiet": quiet}
elif quiet:
params = {"quiet": quiet}
params = { "quiet": quiet}
if dest is not None:
params["destination"] = dest

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

0 comments on commit dba9d76

Please sign in to comment.