[Mailman-Developers] MemberAdaptor.py [missing line?]
donal.hunt2@mail.dcu.ie
donal.hunt2@mail.dcu.ie
Sun, 27 Jan 2002 01:55:08 +0000
>-- Original Message --
>Date: Sat, 26 Jan 2002 18:57:08 -0500
>To: Donal Hunt <donal.hunt2@mail.dcu.ie>
>Cc: "mailman-developers@python.org" <mailman-developers@python.org>
>Subject: Re: [Mailman-Developers] MemberAdaptor.py [missing line?]
>From: barry@zope.com (Barry A. Warsaw)
>
> DH> should there be a "raise NotImplemented" after the
> DH> documentation stuff?? ie - is that the general rule to raise
> DH> with any method in MemberAdaptor that we don't want
> DH> implemented...
>
>Not quite, although you're right that there should be a "raise
>NotImplemented" there. The exception is raised in the method because
>MemberAdaptor.py plays the role of an abstract interface, defining
>method that /must/ be overridden in derived classes. In practice, it
>probably makes little difference, but I'll add it back for cleanliness.
Yeh - it was more a cleanliness thing more than anything...
> DH> Currently working on the LDAP authenticator and I don't want
> DH> people to change their LDAP password with Mailman. :)
>
>Then you should either no-op the setMemberPassword() method, or raise
>a RuntimeError. I sort of doubt that Mailman is prepared to capture
>exceptions in the MemberAdaptor methods, so a no-op might be the most
>expedient thing to do.
That's what I wasn't sure about... There's no point raising exceptions
in MemberAdaptor methods if they aren't caught at a later stage...
Depending on what the LDAP authenticator code throws up, i might add some=
code to the Mailman GUI side, so that the users get a nice message when
an admin decides that password changes aren't permitted via Mailman...
I haven't checked the code to see what happens presently...
On a separate note (and more on python train of thought...) - is there a
way of working out what types are being returned by Python methods?? For=
example in the OldStyleMemberships class, you return different structures=
for some methods... eg getRegularMemberKeys() returns a marshal (I think)=
...
If the expected return type was specified in the MemberAdaptor.py file fo=
r
the method, it would be mighty handy... :)
Later
Donal