From ce55ec8cecc685ab40d517908ffad31f2861e0b6 Mon Sep 17 00:00:00 2001 From: Tom Pohl Date: Mon, 25 Jul 2022 06:38:26 +0000 Subject: [PATCH] fix: Container.stats for non-stream mode In non-stream mode, container.stats should work now (fixing incorrect call of StringIO.writer instead of StringIO.write). Signed-off-by: Tom Pohl --- podman/domain/containers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/podman/domain/containers.py b/podman/domain/containers.py index 6bbd00c6..fd0d3537 100644 --- a/podman/domain/containers.py +++ b/podman/domain/containers.py @@ -419,7 +419,7 @@ def stats(self, **kwargs) -> Union[Sequence[Dict[str, bytes]], bytes]: with io.StringIO() as buffer: for entry in response.text: - buffer.writer(json.dumps(entry) + "\n") + buffer.write(json.dumps(entry) + "\n") return buffer.getvalue() @staticmethod