From 020497139c0d1a3e37a9cd3ec17062908f53b935 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 25 Dec 2022 02:13:00 -0500 Subject: [PATCH] Decode command output as ascii --- mailman_sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailman_sync.py b/mailman_sync.py index a2dcb3d..6ed93f3 100755 --- a/mailman_sync.py +++ b/mailman_sync.py @@ -28,7 +28,7 @@ def sync_members(mailman_bin: Path, mailing_list: str, members: list[str]): capture_output=True, check=True, ) - print(output) + print(output.stdout.decode('ascii')) def main(mailman_bin: Path, api: str, token: str, list_suffix: str): @@ -39,7 +39,7 @@ def main(mailman_bin: Path, api: str, token: str, list_suffix: str): existing_lists = subprocess.run( [mailman_bin / "list_lists", "-b"], capture_output=True, check=True - ).stdout.split(b"\n") + ).stdout.decode('ascii').split("\n") certification_lists = r.json() for name, members in certification_lists.items(): list_name = name + list_suffix