Skip to content

Commit b20360f

Browse files
Merge pull request #500 from D3vil0p3r/patch-1
Add compatMode raw JSON output and fix tls_verify init on pull()
2 parents c6db9c2 + 4bd2d33 commit b20360f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

podman/domain/images_manager.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ def pull(
324324
auth_config (Mapping[str, str]) – Override the credentials that are found in the
325325
config for this request. auth_config should contain the username and password
326326
keys to be valid.
327+
compatMode (bool) – Return the same JSON payload as the Docker-compat endpoint.
328+
Default: True.
327329
decode (bool) – Decode the JSON data from the server into dicts.
328330
Only applies with ``stream=True``
329331
platform (str) – Platform in the format os[/arch[/variant]]
@@ -357,7 +359,8 @@ def pull(
357359

358360
params = {
359361
"reference": repository,
360-
"tlsVerify": kwargs.get("tls_verify"),
362+
"tlsVerify": kwargs.get("tls_verify", True),
363+
"compatMode": kwargs.get("compatMode", True),
361364
}
362365

363366
if all_tags:
@@ -409,7 +412,7 @@ def pull(
409412
if stream:
410413
return self._stream_helper(response, decode=kwargs.get("decode"))
411414

412-
for item in response.iter_lines():
415+
for item in reversed(list(response.iter_lines())):
413416
obj = json.loads(item)
414417
if all_tags and "images" in obj:
415418
images: List[Image] = []

0 commit comments

Comments
 (0)