[Mailman-Users] Removing member with <CR> in key - was:(no subject)

Mark Sapiro msapiro at value.net
Mon Apr 2 22:05:06 CEST 2007


Con Wieland wrote:
>
>On Apr 2, 2007, at 11:32 AM, Mark Sapiro wrote:
>
>> First, did you see and try the following from FAQ 3.13
>>
>> ----------------------------------------------------
>>
>> Before trying the method(s) below, first try
>>
>>  % bin/list_members -i listname
>>
>> If that lists the addresses you want removed, try
>>
>>  % bin/list_members -i listname | bin/remove_members -f - listname
>
>Yes I did, it didn't show up that way.


OK.


>> If that doesn't work, try the following withlist fragment
>>
>>>>> m.removeMember("""constance.frei
>>  ... constance.frei at lettres.unige.ch""")
>>>>> m.Save()
>>>>> ^D
>>
>
>I get this error:
>
> >>> m.removeMember("""constance.frei
>... constance.frei at lettres.unige.ch""")
>Traceback (most recent call last):
>   File "<console>", line 1, in ?
>   File "/usr/local/mailman/Mailman/OldStyleMemberships.py", line  
>219, in removeMember
>     assert self.__mlist.Locked()
>AssertionError


Because you didn't specify the -l (or --lock) option on the withlist
command.


>> and if that doesn't work, try
>>
>>>>> del m.members["""constance.frei
>>  ... constance.frei at lettres.unige.ch"""]
>>>>> m.Save()
>>>>> ^D
>
>and with this I get:
>
> >>> del m.members["""constance.frei
>... constance.frei at lettres.unige.ch"""]
>Traceback (most recent call last):
>   File "<console>", line 1, in ?
>KeyError: 'constance.frei\nconstance.frei at lettres.unige.ch'


Is this invalid member a regular member, or a digest member? If digest,
the above needs to be

 >>> del m.digest_members["""constance.frei
 ... constance.frei at lettres.unige.ch"""]

BUT you should first try the removeMember() method with the list locked.

If none of these work, there something transparent in the key beyond
just the simple new-line. Try

% bin/find_member -l listname "[^\w\-+ at .%]" | od -t c to see what
besides \n is in 'constance.frei\nconstance.frei at lettres.unige.ch'.

Possibly it is '\r' instead of '\n', in which case, try

>>> m.removeMember('constance.frei\rconstance.frei at lettres.unige.ch')

in withlist with the list locked.

-- 
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