commit | cd975761846dd17718f4c55afdbc288b0d9cc534 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Dec 14 22:18:37 1999 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Dec 14 22:18:37 1999 +0000 |
tree | 10645d993acec3c4b7b67f84d8cf32227bfd6df4 | |
parent | 12c6e2d4978e4fdca8262bafeecd5e63eef23c1e [diff] [blame] |
Only set msg.fp to None when there are no extra arguments; if there are, we must keep the file around so we can print the body.
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 3c758ff..108967d 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py
@@ -255,7 +255,8 @@ if msg is None: break msgs.append(msg) - msg.fp = None + if len(args) <= 1: + msg.fp = None if len(args) > 1: num = string.atoi(args[1]) print 'Message %d body:'%num