diff options
Diffstat (limited to 'src/mailman/commands')
| -rw-r--r-- | src/mailman/commands/cli_lists.py | 18 | ||||
| -rw-r--r-- | src/mailman/commands/docs/info.rst | 2 | ||||
| -rw-r--r-- | src/mailman/commands/docs/remove.rst | 44 |
3 files changed, 3 insertions, 61 deletions
diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py index 42e67e3a8..5ae6499e9 100644 --- a/src/mailman/commands/cli_lists.py +++ b/src/mailman/commands/cli_lists.py @@ -252,12 +252,6 @@ class Remove: def add(self, parser, command_parser): """See `ICLISubCommand`.""" command_parser.add_argument( - '-a', '--archives', - default=False, action='store_true', - help=_("""\ -Remove the list's archives too, or if the list has already been deleted, -remove any residual archives.""")) - command_parser.add_argument( '-q', '--quiet', default=False, action='store_true', help=_('Suppress status messages')) @@ -278,15 +272,9 @@ remove any residual archives.""")) fqdn_listname = args.listname[0] mlist = getUtility(IListManager).get(fqdn_listname) if mlist is None: - if args.archives: - log(_('No such list: $fqdn_listname; ' - 'removing residual archives.')) - else: - log(_('No such list: $fqdn_listname')) - return + log(_('No such list: $fqdn_listname')) + return else: log(_('Removed list: $fqdn_listname')) - if not args.archives: - log(_('Not removing archives. Reinvoke with -a to remove them.')) - remove_list(fqdn_listname, mlist, args.archives) + remove_list(fqdn_listname, mlist) config.db.commit() diff --git a/src/mailman/commands/docs/info.rst b/src/mailman/commands/docs/info.rst index 34883711e..5e26b04a3 100644 --- a/src/mailman/commands/docs/info.rst +++ b/src/mailman/commands/docs/info.rst @@ -69,8 +69,6 @@ The File System Hierarchy layout is the same every by definition. LOG_DIR = /var/log/mailman MESSAGES_DIR = /var/lib/mailman/messages PID_FILE = /var/run/mailman/master.pid - PRIVATE_ARCHIVE_FILE_DIR = /var/lib/mailman/archives/private - PUBLIC_ARCHIVE_FILE_DIR = /var/lib/mailman/archives/public QUEUE_DIR = /var/spool/mailman TEMPLATE_DIR = .../mailman/templates VAR_DIR = /var/lib/mailman diff --git a/src/mailman/commands/docs/remove.rst b/src/mailman/commands/docs/remove.rst index f0f4e64f6..35dc53c5e 100644 --- a/src/mailman/commands/docs/remove.rst +++ b/src/mailman/commands/docs/remove.rst @@ -24,7 +24,6 @@ A system administrator can remove mailing lists by the command line. >>> command = Remove() >>> command.process(args) Removed list: test@example.com - Not removing archives. Reinvoke with -a to remove them. >>> print list_manager.get('test@example.com') None @@ -40,46 +39,3 @@ You can also remove lists quietly. >>> print list_manager.get('test@example.com') None - - -Removing archives -================= - -By default 'mailman remove' does not remove a mailing list's archives. -:: - - >>> create_list('test@example.com') - <mailing list "test@example.com" at ...> - - # Fake an mbox file for the mailing list. - >>> import os - >>> def make_mbox(fqdn_listname): - ... mbox_dir = os.path.join( - ... config.PUBLIC_ARCHIVE_FILE_DIR, fqdn_listname + '.mbox') - ... os.makedirs(mbox_dir) - ... mbox_file = os.path.join(mbox_dir, fqdn_listname + '.mbox') - ... with open(mbox_file, 'w') as fp: - ... print >> fp, 'A message' - ... assert os.path.exists(mbox_file) - ... return mbox_file - - >>> mbox_file = make_mbox('test@example.com') - >>> args.quiet = False - >>> command.process(args) - Removed list: test@example.com - Not removing archives. Reinvoke with -a to remove them. - - >>> os.path.exists(mbox_file) - True - -Even if the mailing list has been deleted, you can still delete the archives -afterward. -:: - - >>> args.archives = True - - >>> command.process(args) - No such list: test@example.com; removing residual archives. - - >>> os.path.exists(mbox_file) - False |
