[Zope] about the IMAPAdapter Product product
Michel Pelletier
michel@digicool.com
Wed, 24 Nov 1999 14:34:47 -0500
> -----Original Message-----
> From: al004151@alumail.uji.es [mailto:al004151@alumail.uji.es]
> Sent: Wednesday, November 24, 1999 12:27 PM
> To: zope@zope.org
> Subject: [Zope] about the IMAPAdapter Product product
>
>
> The lines 106-108 of the file "IMAPAdapter.py" are:
>
> def addIMAPAdapter(self, title='', default_domain='',
> smtp_server='', smtp_port=25, imap_server='',
> imap_port=143, roles, REQUEST=None):
>
> the roles parameter has no default value while REQUEST has, this gives
> me an error. Shouldn't it be roles=''?
The version you downloaded should have been taken off the web page weeks
ago, my bad. You have an old version that was written with 1.5.1, which
allowed this kind of construct with no error (even though it is wrong).
NotMail and IMAPAdapter are now maintained by benno@sesgroup.net
http://www.zope.org/Members/Benno/NotMail2
> And a question, the method validate begins:
> def validate(self, request, auth='', roles=None):
> """ """
> if 'NotMail' not in roles: <--- Why these two lines?
> return None <---
It's a hack.
-Michel