From a0a3ab8d0e8a0b90dc3469b4d95c018d6de109d0 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 2 Sep 2023 00:01:04 -0400 Subject: [PATCH] Compare list names in lowercase --- mailman_sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mailman_sync.py b/mailman_sync.py index c125b62..a111faa 100755 --- a/mailman_sync.py +++ b/mailman_sync.py @@ -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