Compare commits

...

3 Commits

View File

@ -45,8 +45,8 @@ def config_list(
"anonymous_list": True,
"archive_policy": "private",
"member_roster_visibility": "moderators",
"subscribe_policy": "confirm_then_moderate",
"unsubscribe_policy": "confirm",
"subscription_policy": "confirm_then_moderate",
"unsubscription_policy": "confirm",
"default_member_action": "hold",
"default_nonmember_action": "discard",
"advertised": False,
@ -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)
@ -112,7 +112,7 @@ def sync_moderators(
for address, display_name in members_to_add.items():
print(f"Adding '{display_name} <{address}>' as moderator to list {list}")
if not dry_run:
list.subscribe(address, display_name)
list.add_moderator(address, display_name)
for member in members_to_remove:
print(f"Removing {member} as moderator from list {list}")