Commit b8ba9f9d authored by Barry Warsaw's avatar Barry Warsaw

_structure(): Make sure all output goes the to fp object.

parent 8bb618d5
......@@ -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)
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