On 3/4/20 12:30 PM, sean_sullivan@rhoworld.com wrote:
Never mind, I was able to figure it out. If anyone else is searching for a similar issue.
Here again, using mailmanclient can work, but it is very round about. I.e. you are calling client which makes a REST call via http to core to do what you want when you can talk to core directly.
from urllib.error import HTTPError
def remove(mlist): curr_list = mlist.fqdn_listname my_list = client.get_list(curr_list) r_addresses = ['test1@example.com', 'test2@example.com', 'test3@example.com'] for email_addr in r_addresses: try: my_list.remove_owner(email_addr) except HTTPError as err: print (email_addr,my_list, err)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan