On 6/1/22 00:45, David Lopez via Mailman-users wrote:
I'm on postorius 1.3.4 so I tried to do via shell but after logging it shows a syntax error.
mailman shell -l mylist@mydomain(dot)com pendingsdb = getUtility(IPendings)
for token, data in pendingsdb.find(m, pend_type='unsubscription'): ... ... if data['token_owner'] == 'moderator': File "<console>", line 2 ... if data['token_owner'] == 'moderator': ^ IndentationError: expected an indented block ... pendingsdb.confirm(token) File "<console>", line 1 ... pendingsdb.confirm(token)
You are entering the ...
prompts that I showed in my example. You show
... ... if data['token_owner'] == 'moderator':
the first ...
is the actual prompt from mailman shell. The second
...
is the prompt from my example which you shouldn't enter. You
should only be entering
pendingsdb = getUtility(IPendings)
for token, data in pendingsdb.find(m, pend_type='unsubscription'):
if data['token_owner'] == 'moderator':
pendingsdb.confirm(token)
commit()
Indentation is important. After pendingsdb.confirm(token)
enter an
empty line at the last ...
prompt.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan