Commit 69e18af9 authored by Barry Warsaw's avatar Barry Warsaw

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

parent is now a multipart with one element, the sub-message object).
parent 2c685066
...@@ -8,9 +8,8 @@ import re ...@@ -8,9 +8,8 @@ import re
from cStringIO import StringIO from cStringIO import StringIO
from types import ListType from types import ListType
# Intrapackage imports from email import Errors
import Errors from email import Message
import Message
EMPTYSTRING = '' EMPTYSTRING = ''
NL = '\n' NL = '\n'
...@@ -176,7 +175,7 @@ class Parser: ...@@ -176,7 +175,7 @@ class Parser:
except Errors.HeaderParseError: except Errors.HeaderParseError:
msg = self._class() msg = self._class()
self._parsebody(msg, fp) self._parsebody(msg, fp)
container.set_payload(msg) container.attach(msg)
else: else:
container.set_payload(fp.read()) container.set_payload(fp.read())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment