Decode command output as ascii

This commit is contained in:
Adam Goldsmith 2022-12-25 02:13:00 -05:00
parent 2daf2c00b8
commit 020497139c

View File

@ -28,7 +28,7 @@ def sync_members(mailman_bin: Path, mailing_list: str, members: list[str]):
capture_output=True, capture_output=True,
check=True, check=True,
) )
print(output) print(output.stdout.decode('ascii'))
def main(mailman_bin: Path, api: str, token: str, list_suffix: str): 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( existing_lists = subprocess.run(
[mailman_bin / "list_lists", "-b"], capture_output=True, check=True [mailman_bin / "list_lists", "-b"], capture_output=True, check=True
).stdout.split(b"\n") ).stdout.decode('ascii').split("\n")
certification_lists = r.json() certification_lists = r.json()
for name, members in certification_lists.items(): for name, members in certification_lists.items():
list_name = name + list_suffix list_name = name + list_suffix