Skip to content

Commit

Permalink
Add compatMode raw JSON output and fix tls_verify init on pull()
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio <vozaanthony@gmail.com>
  • Loading branch information
D3vil0p3r committed Jan 15, 2025
1 parent 8cab9d8 commit 4bd2d33
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions podman/domain/images_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ def pull(
auth_config (Mapping[str, str]) – Override the credentials that are found in the
config for this request. auth_config should contain the username and password
keys to be valid.
compatMode (bool) – Return the same JSON payload as the Docker-compat endpoint.
Default: True.
decode (bool) – Decode the JSON data from the server into dicts.
Only applies with ``stream=True``
platform (str) – Platform in the format os[/arch[/variant]]
Expand Down Expand Up @@ -357,7 +359,8 @@ def pull(

params = {
"reference": repository,
"tlsVerify": kwargs.get("tls_verify"),
"tlsVerify": kwargs.get("tls_verify", True),
"compatMode": kwargs.get("compatMode", True),
}

if all_tags:
Expand Down Expand Up @@ -409,7 +412,7 @@ def pull(
if stream:
return self._stream_helper(response, decode=kwargs.get("decode"))

for item in response.iter_lines():
for item in reversed(list(response.iter_lines())):
obj = json.loads(item)
if all_tags and "images" in obj:
images: List[Image] = []
Expand Down

0 comments on commit 4bd2d33

Please sign in to comment.