[Mailman-Users] remove_members --fromall -f

Xiaoyan Ma xma at uclink.berkeley.edu
Thu Dec 1 23:35:00 CET 2005


Mark:

The dummy argument worked!!
[root at localhost bin]# ./remove_members --fromall -f /home/xma/removetest.txt dummy
User `testing at Berkeley.edu' removed from list: testlista.
User `xmatest at yahoo.com' removed from list: testlista.
User `test at test.coM' removed from list: testlista.

Thank you.

And I would love to help testing out the patch. But I got the follow error

patching file remove_members
Hunk #2 FAILED at 110.
Hunk #3 succeeded at 97 with fuzz 2 (offset -34 lines).
1 out of 3 hunks FAILED -- saving rejects to file remove_members.rej



  reject file:

***************
*** 110,118 ****
       except getopt.error, msg:
           usage(1, msg)

-  if len(args) < 1:
-  usage(1)
-
       filename = None
       all = False
       alllists = False
--- 110,115 ----
       except getopt.error, msg:
           usage(1, msg)

       filename = None
       all = False
       alllists = False


Maybe I did something wrong.  Please let me know and I will try again.


Thanks.
Xiaoyan




On Thu, 1 Dec 2005 13:35:47 -0800
  Mark Sapiro <msapiro at value.net> wrote:
> 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