_parsebody(): Fix for the new message/rfc822 tree structure (the

parent is now a multipart with one element, the sub-message object).
This commit is contained in:
Barry Warsaw 2002-06-02 19:12:03 +00:00
parent 2c68506604
commit 69e18af968
1 changed files with 3 additions and 4 deletions

View File

@ -8,9 +8,8 @@ import re
from cStringIO import StringIO
from types import ListType
# Intrapackage imports
import Errors
import Message
from email import Errors
from email import Message
EMPTYSTRING = ''
NL = '\n'
@ -176,7 +175,7 @@ class Parser:
except Errors.HeaderParseError:
msg = self._class()
self._parsebody(msg, fp)
container.set_payload(msg)
container.attach(msg)
else:
container.set_payload(fp.read())