[Mailman-Developers] multifile.Error : sudden EOF in MultiFile.readline()
Barry A. Warsaw
bwarsaw@python.org
Wed, 7 Jun 2000 23:45:36 -0400 (EDT)
In situations like this, it would be nice to have the original
message, because it's probably incomplete or otherwise misformated.
But in any case, please try this patch.
-Barry
Index: Postfix.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Postfix.py,v
retrieving revision 1.6
diff -c -r1.6 Postfix.py
*** Postfix.py 2000/06/05 15:54:47 1.6
--- Postfix.py 2000/06/08 03:41:18
***************
*** 43,49 ****
if not more:
# we didn't find it
return None
! s = StringIO(mfile.read())
msg2 = mimetools.Message(s)
if msg2.gettype() == 'text/plain':
desc = msg2.get('content-description')
--- 43,53 ----
if not more:
# we didn't find it
return None
! try:
! s = StringIO(mfile.read())
! except multifile.Error:
! # It is a mis-formated or incomplete message
! return None
msg2 = mimetools.Message(s)
if msg2.gettype() == 'text/plain':
desc = msg2.get('content-description')