Update of /cvsroot/mailman/mailman/Mailman/Commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8128/Mailman/Commands

Modified Files:
        cmd_confirm.py cmd_password.py cmd_set.py cmd_subscribe.py 
Log Message:
back porting from 2.1.6


Index: cmd_confirm.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Commands/cmd_confirm.py,v
retrieving revision 2.8
retrieving revision 2.9
diff -u -d -r2.8 -r2.9
--- cmd_confirm.py      27 Aug 2005 01:54:02 -0000      2.8
+++ cmd_confirm.py      28 Aug 2005 05:31:27 -0000      2.9
@@ -67,6 +67,9 @@
         res.results.append(_("""\
 You were not invited to this mailing list.  The invitation has been discarded,
 and both list administrators have been alerted."""))
+    except Errors.MMBadPasswordError:
+        res.results.append(_("""\
+Bad approval password given.  Held message is still being held."""))
     else:
         if ((results[0] == Pending.SUBSCRIPTION and mlist.send_welcome_msg)
             or

Index: cmd_password.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Commands/cmd_password.py,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -d -r2.1 -r2.2
--- cmd_password.py     27 Aug 2005 01:54:02 -0000      2.1
+++ cmd_password.py     28 Aug 2005 05:31:27 -0000      2.2
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2002-2004 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -49,6 +49,8 @@
         if mlist.isMember(address):
             password = mlist.getMemberPassword(address)
             res.results.append(_('Your password is: %(password)s'))
+            # Prohibit multiple password retrievals.
+            return STOP
         else:
             listname = mlist.real_name
             res.results.append(
@@ -62,6 +64,8 @@
         if mlist.isMember(address):
             password = mlist.getMemberPassword(address)
             res.results.append(_('Your password is: %(password)s'))
+            # Prohibit multiple password retrievals.
+            return STOP
         else:
             listname = mlist.real_name
             res.results.append(

Index: cmd_set.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Commands/cmd_set.py,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -d -r2.2 -r2.3
--- cmd_set.py  27 Aug 2005 01:54:02 -0000      2.2
+++ cmd_set.py  28 Aug 2005 05:31:27 -0000      2.3
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2002-2003 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -292,10 +292,16 @@
         status = self._status(res, args[0])
         if status < 0:
             return STOP
-        # sense is reversed
-        mlist.setMemberOption(self.__address, mm_cfg.DisableDelivery,
-                              not status)
-        res.results.append(_('delivery option set'))
+        # Delivery status is handled differently than other options.  If
+        # status is true (set delivery on), then we enable delivery.
+        # Otherwise, we have to use the setDeliveryStatus() interface to
+        # specify that delivery was disabled by the user.
+        if status:
+            mlist.setDeliveryStatus(self.__address, MemberAdaptor.ENABLED)
+            res.results.append(_('delivery enabled'))
+        else:
+            mlist.setDeliveryStatus(self.__address, MemberAdaptor.BYUSER)
+            res.results.append(_('delivery disabled by user'))
 
     def set_myposts(self, res, args):
         mlist = res.mlist
@@ -308,7 +314,7 @@
         mlist.setMemberOption(self.__address, mm_cfg.DontReceiveOwnPosts,
                               not status)
         res.results.append(_('myposts option set'))
-        
+
     def set_hide(self, res, args):
         mlist = res.mlist
         if len(args) <> 1:
@@ -343,7 +349,7 @@
         mlist.setMemberOption(self.__address, mm_cfg.SuppressPasswordReminder,
                               not status)
         res.results.append(_('reminder option set'))
-        
+
 
 
 def process(res, args):

Index: cmd_subscribe.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Commands/cmd_subscribe.py,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -d -r2.3 -r2.4
--- cmd_subscribe.py    27 Aug 2005 01:54:02 -0000      2.3
+++ cmd_subscribe.py    28 Aug 2005 05:31:27 -0000      2.4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2002-2005 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -84,9 +84,12 @@
             res.results.append(_('No valid address found to subscribe'))
             return STOP
         # Watch for encoded names
-        h = make_header(decode_header(realname))
-        # BAW: in Python 2.2, use just unicode(h)
-        realname = h.__unicode__()
+        try:
+            h = make_header(decode_header(realname))
+            # BAW: in Python 2.2, use just unicode(h)
+            realname = h.__unicode__()
+        except UnicodeError:
+            realname = u''
         # Coerce to byte string if uh contains only ascii
         try:
             realname = realname.encode('us-ascii')

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to