"Jason R. Mastaler" <[EMAIL PROTECTED]> writes: > Tim Legant <[EMAIL PROTECTED]> writes: > >> Incomplete class hierarchy from email/Errors.py: >> >> MessageError >> +- MessageParseError >> +- BoundaryError >> +- HeaderParseError >> >> So... code that catches a BoundaryError won't catch a >> HeaderParseError. Code that catches a MessageError will catch both. >> John's message was raising a HeaderParseError while parsing. > > So is the fix just the following? Or is there a reason you decided > not to check it in? > > > Index: Pending.py > =================================================================== > RCS file: /cvsroot/tmda/tmda/TMDA/Pending.py,v > retrieving revision 1.29 > diff -u -r1.29 Pending.py > --- Pending.py 11 Jan 2004 07:36:52 -0000 1.29 > +++ Pending.py 15 Jan 2004 19:48:45 -0000 > @@ -423,7 +423,7 @@ > raise Errors.MessageError, '%s not found!' % self.msgid > try: > self.msgobj = email.message_from_file(open(self.msgfile, 'r')) > - except email.Errors.BoundaryError: > + except email.Errors.MessageError: > self.msgobj = Util.msg_from_file(open(self.msgfile, 'r')) > self.recipient = recipient > if self.recipient is None:
Well, as I said in my original message, this is what the code should be doing. However, it won't fix John's problem at all, since after email.message_from_file fails, Util.msg_from_file will also fail (with the same exception) and we're right back where we started. I probably didn't check this fix in because I forgot about it after I noted the problem in response to John's question and continued answering questions on -users. Tim _________________________________________________ tmda-workers mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-workers
