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:
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to