~launchpad-pqm/mailman/2.1

« back to all changes in this revision

Viewing changes to bin/newlist

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-10-21 01:06:17 UTC
  • mfrom: (975.1.1 mailman.2112)
  • Revision ID: launchpad@pqm.canonical.com-20091021010617-prbs2ay6nhxx515v
[rs=flacoste] Upgrade Mailman to upstream 2.1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! @PYTHON@
2
2
#
3
 
# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
 
3
# Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
4
4
#
5
5
# This program is free software; you can redistribute it and/or
6
6
# modify it under the terms of the GNU General Public License
14
14
#
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
18
# USA.
18
19
 
19
20
"""Create a new, unpopulated mailing list.
20
21
 
93
94
import os
94
95
import getpass
95
96
import getopt
96
 
import sha
97
97
 
98
98
import paths
99
99
from Mailman import mm_cfg
186
186
 
187
187
    mlist = MailList.MailList()
188
188
    try:
189
 
        pw = sha.new(listpasswd).hexdigest()
 
189
        pw = Utils.sha_new(listpasswd).hexdigest()
190
190
        # Guarantee that all newly created files have the proper permission.
191
191
        # proper group ownership should be assured by the autoconf script
192
192
        # enforcing that all directories have the group sticky bit set
193
193
        oldmask = os.umask(002)
194
194
        try:
195
195
            try:
196
 
                mlist.Create(listname, owner_mail, pw)
 
196
                if lang == mm_cfg.DEFAULT_SERVER_LANGUAGE:
 
197
                    langs = [lang]
 
198
                else:
 
199
                    langs = [lang, mm_cfg.DEFAULT_SERVER_LANGUAGE]
 
200
                mlist.Create(listname, owner_mail, pw, langs=langs)
197
201
            finally:
198
202
                os.umask(oldmask)
199
203
        except Errors.BadListNameError, s: