diff options
| author | Barry Warsaw | 2017-07-22 03:02:06 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-07-22 03:02:06 +0000 |
| commit | 02826321d0430d7ffc1f674eeff4221941689ef7 (patch) | |
| tree | 1a8e56dff0eab71e58e5fc9ecc5f3c614d7edca7 /src/mailman/commands/docs/remove.rst | |
| parent | f54c045519300f6f70947d1114f46c2b8ae0d368 (diff) | |
| parent | f00b94f18e1d82d1488cbcee6053f03423bc2f49 (diff) | |
| download | mailman-02826321d0430d7ffc1f674eeff4221941689ef7.tar.gz mailman-02826321d0430d7ffc1f674eeff4221941689ef7.tar.zst mailman-02826321d0430d7ffc1f674eeff4221941689ef7.zip | |
Diffstat (limited to 'src/mailman/commands/docs/remove.rst')
| -rw-r--r-- | src/mailman/commands/docs/remove.rst | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/mailman/commands/docs/remove.rst b/src/mailman/commands/docs/remove.rst index c534741f3..f13d8cacd 100644 --- a/src/mailman/commands/docs/remove.rst +++ b/src/mailman/commands/docs/remove.rst @@ -5,37 +5,26 @@ Command line list removal A system administrator can remove mailing lists by the command line. :: - >>> create_list('test@example.com') - <mailing list "test@example.com" at ...> + >>> create_list('ant@example.com') + <mailing list "ant@example.com" at ...> + + >>> command = cli('mailman.commands.cli_lists.remove') + >>> command('mailman remove ant@example.com') + Removed list: ant@example.com >>> from mailman.interfaces.listmanager import IListManager >>> from zope.component import getUtility >>> list_manager = getUtility(IListManager) - >>> list_manager.get('test@example.com') - <mailing list "test@example.com" at ...> - - >>> class FakeArgs: - ... quiet = False - ... archives = False - ... listname = ['test@example.com'] - >>> args = FakeArgs() - - >>> from mailman.commands.cli_lists import Remove - >>> command = Remove() - >>> command.process(args) - Removed list: test@example.com - - >>> print(list_manager.get('test@example.com')) + >>> print(list_manager.get('ant@example.com')) None You can also remove lists quietly. :: - >>> create_list('test@example.com') - <mailing list "test@example.com" at ...> + >>> create_list('ant@example.com') + <mailing list "ant@example.com" at ...> - >>> args.quiet = True - >>> command.process(args) + >>> command('mailman remove ant@example.com --quiet') - >>> print(list_manager.get('test@example.com')) + >>> print(list_manager.get('ant@example.com')) None |
