[Mailman-Users] remove_members --fromall -f

Mark Sapiro msapiro at value.net
Thu Dec 1 22:35:47 CET 2005


Xiaoyan Ma wrote:

>On Thu, 1 Dec 2005 21:33:32 +0100
>  Sythos <sythos at sythos.net> wrote:
>> Il Thu, 01 Dec 2005 12:22:27 -0800
>> "Xiaoyan Ma" <xma at uclink.berkeley.edu> scrisse:
>> 
>>> [xma at localhost bin]$ sudo ./remove_members --fromall
>>> -f /home/xma/removetest.txt Remove members from a list.
>>> 
>>> Usage:
>>>      remove_members [options] [listname] [addr1 ...]
>> 
>> try:
>> 
>> cat /home/xma/removetest.txt | ./remove_members --fromall -f

The above would have to be

cat /home/xma/removetest.txt | ./remove_members --fromall -f -

But that won't work either because there is a bug in remove_members. It
insists on having at least one argument in addition to the options.
Clearly this should not be required in the case where --fromall and
-f|--file are both specified.

I'll fix this for 2.1.7. In the mean time, you can work around this
with the command

sudo ./remove_members -f /home/xma/removetest.txt --fromall dummy_arg

or

sudo ./remove_members --fromall -f /home/xma/removetest.txt dummy_arg

where dummy_arg can be anything. And BTW, don't but quotes around the
addresses in the file.




Or you can test the following patch for me :-)

--- f:/test_mailman-2.1.6/bin/remove_members    2003-03-31 12:07:56
+++ f:/test-mailman/bin/remove_members  2005-12-01 13:31:23
@@ -1,6 +1,6 @@
 #! /usr/bin/python
 #
-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2005 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
@@ -110,9 +110,6 @@
     except getopt.error, msg:
         usage(1, msg)

-    if len(args) < 1:
-        usage(1)
-
     filename = None
     all = False
     alllists = False
@@ -134,6 +131,9 @@
         elif opt in ('-N', '--noadminack'):
             admin_notif = False

+    if len(args) < 1 and not (filename and alllists):
+        usage(1)
+
     # You probably don't want to delete all the users of all the lists
-- Marc
     if all and alllists:
        usage(1)

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list