Compare list names in lowercase

This commit is contained in:
Adam Goldsmith 2023-09-02 00:01:04 -04:00
parent a19fa0bbef
commit a0a3ab8d0e

View File

@ -134,11 +134,11 @@ def main(
expected_lists = r.json()
domain = mailman_client.get_domain(mail_host)
existing_lists = {list.list_name: list for list in domain.get_lists()}
existing_lists = {list.list_name.lower(): list for list in domain.get_lists()}
for name, props in expected_lists.items():
if name in existing_lists:
list = existing_lists[name]
if name.lower() in existing_lists:
list = existing_lists[name.lower()]
elif dry_run:
print(f"Skipping non-existing list {name} in dry run mode")
continue