------------------------------------------------------------
revno: 1162
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Tue 2009-01-20 12:22:08 -0800
message:
  Two of the 'new' class exceptions are raised with an argument.
modified:
  Mailman/Cgi/subscribe.py
  Mailman/Errors.py

=== modified file 'Mailman/Cgi/subscribe.py'
--- a/Mailman/Cgi/subscribe.py  2005-08-27 01:40:17 +0000
+++ b/Mailman/Cgi/subscribe.py  2009-01-20 20:22:08 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 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
@@ -12,7 +12,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
 
 """Process subscription or roster requests from listinfo form."""
 
@@ -204,8 +205,8 @@
         if privacy_results:
             results = privacy_results
         else:
-            # We need to interpolate into x
-            x = _(x)
+            # We need to interpolate into x.__str__()
+            x = _(str(x))
             results = _("""\
 Your subscription request was deferred because %(x)s.  Your request has been
 forwarded to the list moderator.  You will receive email informing you of the

=== modified file 'Mailman/Errors.py'
--- a/Mailman/Errors.py 2008-11-22 23:24:58 +0000
+++ b/Mailman/Errors.py 2009-01-20 20:22:08 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 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
@@ -12,7 +12,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
 
 
 """Shared mailman errors and messages."""
@@ -51,9 +52,17 @@
 
 class MMMustDigestError: pass
 class MMCantDigestError: pass
-class MMNeedApproval: pass
+class MMNeedApproval:
+    def __init__(self, message=None):
+        self.message = message
+    def __str__(self):
+        return self.message or ''
 class MMSubscribeNeedsConfirmation: pass
-class MMBadConfirmation: pass
+class MMBadConfirmation:
+    def __init__(self, message=None):
+        self.message = message
+    def __str__(self):
+        return self.message or ''
 class MMAlreadyDigested: pass
 class MMAlreadyUndigested: pass
 



--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to