Use more generic variable name for expected lists

This commit is contained in:
Adam Goldsmith 2023-01-11 01:36:30 -05:00
parent df4e3a6afd
commit 686bfc7e24

View File

@ -116,6 +116,7 @@ def main(
if not r.ok: if not r.ok:
print(f"Failed to get mailing list data from api: {r.status_code} {r.text}") print(f"Failed to get mailing list data from api: {r.status_code} {r.text}")
return return
expected_lists = r.json()
existing_lists = subprocess.run( existing_lists = subprocess.run(
[mailman_bin / "list_lists", "-b"], [mailman_bin / "list_lists", "-b"],
@ -123,8 +124,7 @@ def main(
capture_output=True, capture_output=True,
check=True, check=True,
).stdout.split("\n") ).stdout.split("\n")
certification_lists = r.json() for name, members in expected_lists.items():
for name, members in certification_lists.items():
list_name = name + list_suffix list_name = name + list_suffix
list_manager = ListManager(mailman_bin, list_name, dry_run) list_manager = ListManager(mailman_bin, list_name, dry_run)
if list_name not in existing_lists: if list_name not in existing_lists: