
On 1/3/20 7:57 AM, ritwik p wrote:
The mentioned issue: https://gitlab.com/mailman/mailman/issues/553
So, the line 65 in
eml_confirm.py
in/src/mailman/commands/
which raises the error isassert member is None, member
Basically what this line is doing is checking if the
member
isNone
or not and if it ISN'T, it raises an Assertion Error with member details printed. According to the comments (line 57-60) in the same file, member would beNone
when there's an unsubscription, but here it is NOT None (idk why).
Because the comment is backwards.
2 pretty simple ways of dealing with this will be:
- commenting the line
- adding an
except AssertionError
lineBut these won't solve the root problem, i.e why is the member NOT None.
because member exists when when we are unsubscribing a member and member doesn't yet exist when we are subscribing a new member.
The comment We can't assert anything about member.
actually applies to
all the conditions, not just if new_token is None:
The point is that the comment is wrong and also that
elif token_owner is TokenOwner.moderator: # This must have been a confirm-then-moderator subscription.
is wrong because it could also be a confirm-then-moderate unsubscription
I'm currently looking a bit more into it but, How should I proceed with this??
Create some additional tests for unsubscription when policy is
confirm_then_moderate that will fail on the assert member is None
.
Once you are satisfied that you are testing all the combinations of subscribe/unsubscribe and policy confirm with and without moderate, fix the code so the tests pass.
Also, couple of doubts:
- How can a moderator confirm the unsubscription request??
Usually, through the Postorius web UI, but also by email, and you need to be sure that's tested too.
- For the tables
user
andmember
inmailman.db
file inmailman/var/data/
, when a person unsubscribes from a list, the entry of that member is deleted from themember
table but not fromuser
table. Is it due to the fact that even if the person is not a member, they can still be user??
Yes. The user could be a member of other lists, but even if not the user remains. This is the subject of <https://gitlab.com/mailman/mailman/issues/646>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan