]> granicus.if.org Git - python/commitdiff
Use absolute import paths for intrapackage imports.
authorBarry Warsaw <barry@python.org>
Sun, 2 Jun 2002 19:05:51 +0000 (19:05 +0000)
committerBarry Warsaw <barry@python.org>
Sun, 2 Jun 2002 19:05:51 +0000 (19:05 +0000)
as_string(): Use Generator.flatten() for better performance.

Lib/email/Message.py

index 84a4e16cc960edd9b407afa6527ea36436444326..491c259920b9b425f7e0f96cf3d2d094fd1c7bf9 100644 (file)
@@ -10,9 +10,9 @@ from cStringIO import StringIO
 from types import ListType, StringType
 
 # Intrapackage imports
-import Errors
-import Utils
-import Charset
+from email import Errors
+from email import Utils
+from email import Charset
 
 SEMISPACE = '; '
 
@@ -78,10 +78,10 @@ class Message:
         Optional `unixfrom' when true, means include the Unix From_ envelope
         header.
         """
-        from Generator import Generator
+        from email.Generator import Generator
         fp = StringIO()
         g = Generator(fp)
-        g(self, unixfrom=unixfrom)
+        g.flatten(self, unixfrom=unixfrom)
         return fp.getvalue()
 
     def is_multipart(self):