summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
authorbwarsaw2001-08-16 06:32:11 +0000
committerbwarsaw2001-08-16 06:32:11 +0000
commit1002368e89d31e925e31ff2959e7f4c447d663c1 (patch)
treeb54ab2d2b34a329df62f166ba874f577dd4f2636 /Mailman
parent76c5356c3c3d1824a2a560cfa21639576eea658e (diff)
downloadmailman-1002368e89d31e925e31ff2959e7f4c447d663c1.tar.gz
mailman-1002368e89d31e925e31ff2959e7f4c447d663c1.tar.zst
mailman-1002368e89d31e925e31ff2959e7f4c447d663c1.zip
getMemberOption(): Whether the user is a digest member or not is not
kept as a bitfield value in user_options, even though there's an mm_cfg.Digests `flag'. So special case asking for this option by checking the `where' value returned by __get_cp_member(). addNewMember(): Similarly, there's no point in setting user_options to mm_cfg.Digests if the member wants to receive digests, since the state of that flag is kept elsewhere. setMemberOption(): More of the same; we can always return from the "if flag == Digests" clause without touching user_options.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/OldStyleMemberships.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Mailman/OldStyleMemberships.py b/Mailman/OldStyleMemberships.py
index 5b810b178..13bde06d4 100644
--- a/Mailman/OldStyleMemberships.py
+++ b/Mailman/OldStyleMemberships.py
@@ -117,6 +117,9 @@ class OldStyleMemberships(MemberAdaptor):
def getMemberOption(self, member, flag):
self.__assertIsMember(member)
+ if flag == mm_cfg.Digests:
+ cpaddr, where = self.__get_cp_member(member)
+ return where == ISDIGEST
option = self.__mlist.user_options.get(member.lower(), 0)
return not not (option & flag)
@@ -167,8 +170,6 @@ class OldStyleMemberships(MemberAdaptor):
member = member.lower()
if digest:
self.__mlist.digest_members[member] = value
- # Don't use setMemberOption() here because it does too much
- self.__mlist.user_options[member] = mm_cfg.Digests
else:
self.__mlist.members[member] = value
self.setMemberPassword(member, password)
@@ -263,6 +264,9 @@ class OldStyleMemberships(MemberAdaptor):
# things up so that the user receives one last digest,
# otherwise they may lose some email
self.__mlist.one_last_digest[memberkey] = cpuser
+ # We don't need to touch user_options because the digest state
+ # isn't kept as a bitfield flag.
+ return
# This is a bit kludgey because the semantics are that if the user has
# no options set (i.e. the value would be 0), then they have no entry
# in the user_options dict. We use setdefault() here, and then del