From d3be9b2f95cd126b2e634af74438131bd0096400 Mon Sep 17 00:00:00 2001 From: Tasos Papaioannou Date: Fri, 20 Sep 2024 13:08:03 -0400 Subject: [PATCH] Update podman version and demux handler to reflect changes in https://github.com/containers/podman-py/pull/410 --- broker/helpers.py | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/broker/helpers.py b/broker/helpers.py index 181f479..2ff7e68 100644 --- a/broker/helpers.py +++ b/broker/helpers.py @@ -21,7 +21,6 @@ import yaml from broker import exceptions, logger as b_log, settings -from broker.binds.containers import demux_output FilterTest = namedtuple("FilterTest", "haystack needle test") INVENTORY_LOCK = threading.Lock() @@ -574,12 +573,13 @@ def from_ssh(cls, stdout, channel): def from_duplexed_exec(cls, duplex_exec, runtime=None): """Create a Result object from a duplexed exec object from podman or docker.""" if runtime == "podman": - stdout, stderr = demux_output(duplex_exec[1]) + status, (stdout, stderr) = duplex_exec return cls( - status=duplex_exec[0], + status=status, stdout=stdout.decode("utf-8"), stderr=stderr.decode("utf-8"), ) + if duplex_exec.output[0]: stdout = duplex_exec.output[0].decode("utf-8") else: diff --git a/pyproject.toml b/pyproject.toml index cfc0fec..cb39399 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ docker = [ "docker", "paramiko" ] -podman = ["podman"] +podman = ["podman>=5.2"] setup = [ "build", "twine",