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

This commit is contained in:
Barry Warsaw 2004-05-13 20:14:20 +00:00
parent d0c12af7ef
commit d49f1d6c5a
1 changed files with 2 additions and 2 deletions

View File

@ -59,9 +59,9 @@ def _structure(msg, fp=None, level=0, include_default=False):
tab = ' ' * (level * 4) tab = ' ' * (level * 4)
print >> fp, tab + msg.get_content_type(), print >> fp, tab + msg.get_content_type(),
if include_default: if include_default:
print '[%s]' % msg.get_default_type() print >> fp, '[%s]' % msg.get_default_type()
else: else:
print print >> fp
if msg.is_multipart(): if msg.is_multipart():
for subpart in msg.get_payload(): for subpart in msg.get_payload():
_structure(subpart, fp, level+1, include_default) _structure(subpart, fp, level+1, include_default)