On Tue, Apr 7, 2020, at 3:38 AM, skenny@scss.tcd.ie wrote:
Hi, I've been banging my head against the proverbial wall for more than a day trying to remove nonmembers from a list (I am a Mailman3 and Python novice so that might account for something, but anyway ...)
According to https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/..., it should be possible to do:MailingList.remove_role('nonmember', 'email_address@example.com')
However I can't get this to work. I think I have manage to track down all the required imports. This is what I see: TypeError: remove_role() missing 1 required positional argument: 'address'
Do you have a web interface? Then it should have a way to remove members.
If you don't please use the REST API insteadto find a member1 and delete the membership resource to remove the non-member2.
More digging in the docs seems to indicate that a third parameter is required - "self". At this point though I am way out of my depth, and would appreciate any guidance.
"self" is basically a placeholder for the object itself and when you call the method, you need to pass an initialized class.
-- thanks, Abhilash Raj (maxking)