From 2efd3e3f9f22fdcb8e1c5c68a8a7f13f908a1fbc Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 25 Dec 2022 02:14:36 -0500 Subject: [PATCH] Encode members data into bytes --- mailman_sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailman_sync.py b/mailman_sync.py index 6ed93f3..59c272e 100755 --- a/mailman_sync.py +++ b/mailman_sync.py @@ -12,7 +12,7 @@ import requests def sync_members(mailman_bin: Path, mailing_list: str, members: list[str]): - members_file = "\n".join(members) + members_data = "\n".join(members).encode('ascii') output = subprocess.run( [ mailman_bin / "sync_members", @@ -24,7 +24,7 @@ def sync_members(mailman_bin: Path, mailing_list: str, members: list[str]): "-", mailing_list, ], - input=members_file, + input=members_data, capture_output=True, check=True, )