Encode members data into bytes
This commit is contained in:
parent
020497139c
commit
2efd3e3f9f
@ -12,7 +12,7 @@ import requests
|
|||||||
|
|
||||||
|
|
||||||
def sync_members(mailman_bin: Path, mailing_list: str, members: list[str]):
|
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(
|
output = subprocess.run(
|
||||||
[
|
[
|
||||||
mailman_bin / "sync_members",
|
mailman_bin / "sync_members",
|
||||||
@ -24,7 +24,7 @@ def sync_members(mailman_bin: Path, mailing_list: str, members: list[str]):
|
|||||||
"-",
|
"-",
|
||||||
mailing_list,
|
mailing_list,
|
||||||
],
|
],
|
||||||
input=members_file,
|
input=members_data,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
check=True,
|
check=True,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user