summaryrefslogtreecommitdiff
path: root/src/mailman/commands/docs
diff options
context:
space:
mode:
authorBarry Warsaw2009-11-24 23:36:14 -0500
committerBarry Warsaw2009-11-24 23:36:14 -0500
commita26ed5b02a76dd26a72eb8acad819be47dca3049 (patch)
tree916a3a0cacd895519e891cef83930e01c6f3503c /src/mailman/commands/docs
parent79d9e36a0b824548a0f2bc83cb948fc5ce668151 (diff)
downloadmailman-a26ed5b02a76dd26a72eb8acad819be47dca3049.tar.gz
mailman-a26ed5b02a76dd26a72eb8acad819be47dca3049.tar.zst
mailman-a26ed5b02a76dd26a72eb8acad819be47dca3049.zip
Add a development mode setting which changes the basic behavior of mailman.
The only thing it does currently is force the recipients in the low level connection code to a hard-coded address. Also: * Fix the inject command's --filename/-f argument * Make inject's LISTNAME required * When inject reads from stdin, capture C-c and print a nicer message * Extend the members command so that blank lines and lines starting with # are ignored. * members command should not fail when an address is already subscribed. Just warn and continue.
Diffstat (limited to 'src/mailman/commands/docs')
-rw-r--r--src/mailman/commands/docs/members.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mailman/commands/docs/members.txt b/src/mailman/commands/docs/members.txt
index 9872b9ff0..aea76dad8 100644
--- a/src/mailman/commands/docs/members.txt
+++ b/src/mailman/commands/docs/members.txt
@@ -57,3 +57,40 @@ taken from standard input.
>>> sorted(address.address for address in mlist.members.addresses)
[u'aperson@example.com', u'bperson@example.com', u'cperson@example.com',
u'dperson@example.com', u'eperson@example.com', u'fperson@example.com']
+
+Blank lines and lines that begin with '#' are ignored.
+
+ >>> with open(path, 'w') as fp:
+ ... for address in ('gperson@example.com',
+ ... '# hperson@example.com',
+ ... ' ',
+ ... '',
+ ... 'iperson@example.com',
+ ... ):
+ ... print >> fp, address
+
+ >>> args.filename = path
+ >>> command.process(args)
+ >>> sorted(address.address for address in mlist.members.addresses)
+ [u'aperson@example.com', u'bperson@example.com', u'cperson@example.com',
+ u'dperson@example.com', u'eperson@example.com', u'fperson@example.com',
+ u'gperson@example.com', u'iperson@example.com']
+
+Addresses which are already subscribed are ignored, although a warning is
+printed.
+
+ >>> with open(path, 'w') as fp:
+ ... for address in ('gperson@example.com',
+ ... 'aperson@example.com',
+ ... 'jperson@example.com',
+ ... ):
+ ... print >> fp, address
+
+ >>> command.process(args)
+ Already subscribed (skipping): gperson@example.com
+ Already subscribed (skipping): aperson@example.com
+
+ >>> sorted(address.address for address in mlist.members.addresses)
+ [u'aperson@example.com', u'bperson@example.com', u'cperson@example.com',
+ u'dperson@example.com', u'eperson@example.com', u'fperson@example.com',
+ u'gperson@example.com', u'iperson@example.com', u'jperson@example.com']