On 5/7/19 1:54 AM, Henrik Rasmussen wrote:
Do I have to make a commit or something? Even m.accept_these_nonmembers.remove removes the member from the list, it is right back when I return to the Mailman shell:
bash-4.3# mailman shell -l [LISTNAME].lists.example.com Welcome to the GNU Mailman shell The variable 'm' is the [LISTNAME].lists.example.com mailing list
m.accept_these_nonmembers ['listadmin(a)senderdep.example.com'] m.accept_these_nonmembers.remove('listadmin(a)senderdep.example.com') m.accept_these_nonmembers [] quit()
There are potentially two issues here. First, the entire interaction is in the context of a database transaction and quit() exits without committing the transaction. abort() will also abandon the changes but not exit. commit() will commit the changes and not exit, and control-D will implicitly commit and exit.
Thus, you need to exit with control-D or commit() before quit().
However, there is another potential issue and that is the one described at <https://stackoverflow.com/questions/37310770/sqlalchemy-committing-pickle-ty...>. What this says is the way the *_these_nonmembers attributes are defined in the SQLAlchemy data model results in changes due to mutating the list (which .remove() does) aren't recognized. See <https://gitlab.com/mailman/mailman/merge_requests/505>.
I think in your case, if you just do
m.accept_these_nonmembers = [] commit()
and then look at m.accept_these_nonmembers again which will show you what's in the database, you'll see that you have what you want.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan