In reviewing the code I ran into a typo (first part of patch below). I also ran into "return not not foo & bar" which caused me to scratch my head a moment. The second part of the patch is to change this to "return (foo & bar) == bar", however the alternative may be "return not not (foo & bar) # coerce return to 1/0"
Sean
Index: MailList.py
RCS file: /projects/cvsroot/mailman/Mailman/MailList.py,v retrieving revision 1.135 diff -c -r1.135 MailList.py *** MailList.py 1999/09/02 15:04:14 1.135 --- MailList.py 1999/09/12 07:13:51
*** 101,107 **** def __AddMember(self, addr, digest): """adds the appropriate data to the internal members dict.
! If the username has upercase letters in it, then the value in the members dict is the case preserved address, otherwise, the value is 0. """ --- 101,107 ---- def __AddMember(self, addr, digest): """adds the appropriate data to the internal members dict.
! If the username has uppercase letters in it, then the value in the members dict is the case preserved address, otherwise, the value is 0. """
*** 201,207 **** return self.digest_members.has_key(user) if not self.user_options.has_key(user): return 0 ! return not not self.user_options[user] & option
def SetUserOption(self, user, option, value, save_list=1):
user = self.GetUserCanonicalAddress(user)
--- 201,207 ---- return self.digest_members.has_key(user) if not self.user_options.has_key(user): return 0 ! return (self.user_options[user] & option) == option
def SetUserOption(self, user, option, value, save_list=1):
user = self.GetUserCanonicalAddress(user)
-- Linux: Bring back that "greased weasel" feeling. -- Sean Reifschneider, 1998 Sean Reifschneider, Inimitably Superfluous jafo@tummy.com URL: http://www.tummy.com/xvscan HP-UX/Linux/FreeBSD/BSDOS scanning software.