]> granicus.if.org Git - python/commitdiff
_parsebody(): Fix for the new message/rfc822 tree structure (the
authorBarry Warsaw <barry@python.org>
Sun, 2 Jun 2002 19:12:03 +0000 (19:12 +0000)
committerBarry Warsaw <barry@python.org>
Sun, 2 Jun 2002 19:12:03 +0000 (19:12 +0000)
parent is now a multipart with one element, the sub-message object).

Lib/email/Parser.py

index cb994bad1bb05231b1f2ca2b5360c4d23bf077ff..9add4425d5ce5c417e5bd8f999cdac9a1e434375 100644 (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())