3
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
5
# This program is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU General Public License
7
# as published by the Free Software Foundation; either version 2
8
# of the License, or (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
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.
19
"""Increment the digest volume number and reset the digest number to one.
21
Usage: %(PROGRAM)s [options] [listname ...]
26
Print this message and exit.
28
The lists named on the command line are bumped. If no list names are given,
36
from Mailman import mm_cfg
37
from Mailman import Utils
38
from Mailman import MailList
39
from Mailman import Errors
40
from Mailman.i18n import _
42
# Work around known problems with some RedHat cron daemons
44
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
50
def usage(code, msg=''):
55
print >> fd, _(__doc__)
64
opts, args = getopt.getopt(sys.argv[1:], 'h', ['help'])
65
except getopt.error, msg:
69
if opt in ('-h', '--help'):
75
listnames = Utils.list_names()
78
print _('Nothing to do.')
81
for listname in listnames:
83
# be sure the list is locked
84
mlist = MailList.MailList(listname)
85
except Errors.MMListError, e:
86
usage(1, _('No such list: %(listname)s'))
88
mlist.bump_digest_volume()
95
if __name__ == '__main__':