From 05857f6195f11fb40c43174edf5eb30ab8fb1152 Mon Sep 17 00:00:00 2001 From: Urvashi Mohnani Date: Thu, 21 Mar 2024 04:49:17 -0400 Subject: [PATCH] Fix pylint issue with yield Use yield from instead of iterating through the list and doing a yield. Signed-off-by: Urvashi Mohnani --- podman/domain/containers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/podman/domain/containers.py b/podman/domain/containers.py index 18ac5f2f..dea35f8d 100644 --- a/podman/domain/containers.py +++ b/podman/domain/containers.py @@ -217,8 +217,7 @@ def export(self, chunk_size: int = api.DEFAULT_CHUNK_SIZE) -> Iterator[bytes]: response = self.client.get(f"/containers/{self.id}/export", stream=True) response.raise_for_status() - for out in response.iter_content(chunk_size=chunk_size): - yield out + yield from response.iter_content(chunk_size=chunk_size) def get_archive( self, path: str, chunk_size: int = api.DEFAULT_CHUNK_SIZE