[spambayes-dev] Use of email factory function

Sjoerd Mullender sjoerd at acm.org
Thu Aug 5 14:52:57 CEST 2004


Tony Meyer wrote:
>>If we can do something that returns self the first time it is 
>>called and a (truly) new instance for all subsequent calls, it
>>might work. Something like this, perhaps:
> 
> [...]
> 
> I've just checked in lots of changes (and some tests!) to sb_imapfilter.
> You're running from CVS, yes?  If so, if you could see if they break it for
> you (don't for me), that would be great.  There are lots of changes, so
> running on somewhere safe would be good...

It doesn't work and I wonder how it can work in your environment.  The 
problem is that you use both BadIMAPResponse and BadIMAPResponseError to 
raise exceptions, but only the latter is actually defined.

Also, since in sb_imapfilter.py imap is no longer a global variable, the 
call to imap.close() in IMAPSession.SelectFolder() causes a NameError 
exception.  Should that be self.close() instead?

> I have made a change to fix this problem, along the lines (but not quite the
> same) as what you suggested.  I've also changed from always using our own ID
> to using the Message-ID header when possible (but it should still pick up
> the old ones and not retrain/filter them).
> 
> Interested to know what you think... :)
> 
> =Tony Meyer
> 


-- 
Sjoerd Mullender <sjoerd at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 374 bytes
Desc: OpenPGP digital signature
Url : http://mail.python.org/pipermail/spambayes-dev/attachments/20040805/833fea67/signature.pgp


More information about the spambayes-dev mailing list