Encode members data into bytes

This commit is contained in:
Adam Goldsmith 2022-12-25 02:14:36 -05:00
parent 020497139c
commit 2efd3e3f9f

View File

@ -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,
)