diff options
author | Barry Warsaw <barry@python.org> | 2002-06-02 19:12:03 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-06-02 19:12:03 (GMT) |
commit | 69e18af96868cfd1f41bedc4eb494408c9c363f5 (patch) | |
tree | 1263a7cfb84865814c36a57ffe26a90f4ae040e9 /Lib/email | |
parent | 2c685066048da56fa828465064d4aa3770cbff89 (diff) | |
download | cpython-69e18af96868cfd1f41bedc4eb494408c9c363f5.zip cpython-69e18af96868cfd1f41bedc4eb494408c9c363f5.tar.gz cpython-69e18af96868cfd1f41bedc4eb494408c9c363f5.tar.bz2 |
_parsebody(): Fix for the new message/rfc822 tree structure (the
parent is now a multipart with one element, the sub-message object).
Diffstat (limited to 'Lib/email')
-rw-r--r-- | Lib/email/Parser.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/email/Parser.py b/Lib/email/Parser.py index cb994ba..9add442 100644 --- a/Lib/email/Parser.py +++ b/Lib/email/Parser.py @@ -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()) |