Update of /cvsroot/mailman/mailman/Mailman/MTA
In directory sc8-pr-cvs1:/tmp/cvs-serv12099

Modified Files:
        Manual.py 
Log Message:
create(): Add a `quiet' flag which (for this MTA at least) suppresses
some of the output.

Use True/False where appropriate.


Index: Manual.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/MTA/Manual.py,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -d -r2.7 -r2.8
--- Manual.py   25 Oct 2002 20:39:50 -0000      2.7
+++ Manual.py   22 Mar 2003 05:13:01 -0000      2.8
@@ -1,4 +1,4 @@
-# Copyright (C) 2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-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
@@ -26,6 +26,12 @@
 from Mailman.i18n import _
 from Mailman.MTA.Utils import makealiases
 
+try:
+    True, False
+except NameError:
+    True = 1
+    False = 0
+
 
 
 # no-ops for interface compliance
@@ -33,7 +39,7 @@
     class Dummy:
         def lock(self):
             pass
-        def unlock(self, unconditionally=0):
+        def unlock(self, unconditionally=False):
             pass
     return Dummy()
 
@@ -44,7 +50,7 @@
 
 
 # nolock argument is ignored, but exists for interface compliance
-def create(mlist, cgi=0, nolock=0):
+def create(mlist, cgi=False, nolock=False, quiet=False):
     if mlist is None:
         return
     listname = mlist.internal_name()
@@ -54,7 +60,8 @@
         # an email message to mailman-owner requesting that the proper aliases
         # be installed.
         sfp = StringIO()
-        print >> sfp, _("""\
+        if not quiet:
+            print >> sfp, _("""\
 The mailing list `%(listname)s' has been created via the through-the-web
 interface.  In order to complete the activation of this mailing list, the
 proper /etc/aliases (or equivalent) file must be updated.  The program
@@ -64,11 +71,13 @@
 """)
         outfp = sfp
     else:
-        print _("""
+        if not quiet:
+            print _("""\
 To finish creating your mailing list, you must edit your /etc/aliases (or
 equivalent) file by adding the following lines, and possibly running the
 `newaliases' program:
-
+""")
+        print _("""\
 ## %(listname)s mailing list""")
         outfp = sys.stdout
     # Common path
@@ -92,7 +101,7 @@
 
 
 
-def remove(mlist, cgi=0):
+def remove(mlist, cgi=False):
     listname = mlist.internal_name()
     fieldsz = len(listname) + len('-unsubscribe')
     if cgi:



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to