Skip to content

Commit

Permalink
Fix pylint issue with yield
Browse files Browse the repository at this point in the history
Use yield from instead of iterating through the list
and doing a yield.

Signed-off-by: Urvashi Mohnani <[email protected]>
  • Loading branch information
umohnani8 committed Mar 21, 2024
1 parent 5b57a3a commit 276329b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions podman/domain/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 276329b

Please sign in to comment.