aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/add_members8
-rw-r--r--bin/mailmanctl5
-rwxr-xr-xbin/newlist4
-rwxr-xr-xbin/sync_members6
4 files changed, 17 insertions, 6 deletions
diff --git a/bin/add_members b/bin/add_members
index 13321935..a471919e 100755
--- a/bin/add_members
+++ b/bin/add_members
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2013 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
@@ -137,7 +137,11 @@ def addall(mlist, members, digest, ack, outfp, nomail):
userdesc.digest = digest
try:
- mlist.ApprovedAddMember(userdesc, ack, 0)
+ mlist.ApprovedAddMember(userdesc,
+ ack=ack,
+ admin_notif=False,
+ whence='bin/add_members',
+ )
except Errors.MMAlreadyAMember:
print >> tee, _('Already a member: %(member)s')
except Errors.MembershipIsBanned, pattern:
diff --git a/bin/mailmanctl b/bin/mailmanctl
index 9330cfa8..fa14a2cd 100644
--- a/bin/mailmanctl
+++ b/bin/mailmanctl
@@ -1,6 +1,6 @@
#! @PYTHON@
-# Copyright (C) 2001-2012 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 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
@@ -199,7 +199,8 @@ def acquire_lock_1(force):
lock.lock(0.1)
return lock
except LockFile.TimeOutError:
- if not force:
+ # If we're not forcing or the lock can't be determined to be stale.
+ if not force or qrunner_state():
raise
# Force removal of lock first
lock._disown()
diff --git a/bin/newlist b/bin/newlist
index c14b77f3..940ca9f4 100755
--- a/bin/newlist
+++ b/bin/newlist
@@ -204,7 +204,9 @@ def main():
except Errors.BadListNameError, s:
usage(1, _('Illegal list name: %(s)s'))
except Errors.EmailAddressError, s:
- usage(1, _('Bad owner email address: %(s)s'))
+ usage(1, _('Bad owner email address: %(s)s') +
+ _(' - owner addresses need to be fully-qualified names'
+ ' like "owner@example.com", not just "owner".'))
except Errors.MMListAlreadyExistsError:
usage(1, _('List already exists: %(listname)s'))
diff --git a/bin/sync_members b/bin/sync_members
index 13d0b2b0..58262841 100755
--- a/bin/sync_members
+++ b/bin/sync_members
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2013 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
@@ -256,6 +256,8 @@ def main():
try:
if not dryrun:
mlist.ApprovedAddMember(userdesc, welcome, notifyadmin)
+ # Avoid UnicodeError if name can't be decoded
+ name = unicode(name, errors='replace').encode(enc, 'replace')
s = email.Utils.formataddr((name, addr)).encode(enc, 'replace')
print _('Added : %(s)s')
except Errors.MMAlreadyAMember:
@@ -276,6 +278,8 @@ def main():
# reasons is in the database. Use a lower level remove to
# get rid of this member's entry
mlist.removeMember(addr)
+ # Avoid UnicodeError if name can't be decoded
+ name = unicode(name, errors='replace').encode(enc, 'replace')
s = email.Utils.formataddr((name, addr)).encode(enc, 'replace')
print _('Removed: %(s)s')