From 51439a54c282b1714d7edf4b5a113536a4356959 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 2 Sep 2023 00:21:53 -0400 Subject: [PATCH] Convert addresses to strings in `diff_roster()` for set operations --- mailman_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailman_sync.py b/mailman_sync.py index 3373bb4..aa0ed42 100755 --- a/mailman_sync.py +++ b/mailman_sync.py @@ -68,7 +68,7 @@ def diff_roster( expected_members_dict = dict( list(reversed(email.utils.parseaddr(member))) for member in expected_members ) - existing_members_dict = {member.address: member for member in existing_members} + existing_members_dict = {str(member.address): member for member in existing_members} members_to_add = { k: expected_members_dict[k] for k in set(expected_members_dict) - set(existing_members_dict)