summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2004-05-13 20:14:20 (GMT)
committerBarry Warsaw <barry@python.org>2004-05-13 20:14:20 (GMT)
commitd49f1d6c5aa30ce441a976eee7e7dca0a06f1e19 (patch)
tree81ff779d866f04a96693f9bbe914a6a5ffcc94c7 /Lib/email
parentd0c12af7ef8d4b3ff33fb215c3e954497f51b623 (diff)
downloadcpython-d49f1d6c5aa30ce441a976eee7e7dca0a06f1e19.zip
cpython-d49f1d6c5aa30ce441a976eee7e7dca0a06f1e19.tar.gz
cpython-d49f1d6c5aa30ce441a976eee7e7dca0a06f1e19.tar.bz2
_structure(): Make sure all output goes the to fp object.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/Iterators.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/Iterators.py b/Lib/email/Iterators.py
index 2572c20..af6095e 100644
--- a/Lib/email/Iterators.py
+++ b/Lib/email/Iterators.py
@@ -59,9 +59,9 @@ def _structure(msg, fp=None, level=0, include_default=False):
tab = ' ' * (level * 4)
print >> fp, tab + msg.get_content_type(),
if include_default:
- print '[%s]' % msg.get_default_type()
+ print >> fp, '[%s]' % msg.get_default_type()
else:
- print
+ print >> fp
if msg.is_multipart():
for subpart in msg.get_payload():
_structure(subpart, fp, level+1, include_default)