diff options
author | Guido van Rossum <guido@python.org> | 1999-12-14 22:18:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-12-14 22:18:37 (GMT) |
commit | cd975761846dd17718f4c55afdbc288b0d9cc534 (patch) | |
tree | 10645d993acec3c4b7b67f84d8cf32227bfd6df4 /Lib | |
parent | 12c6e2d4978e4fdca8262bafeecd5e63eef23c1e (diff) | |
download | cpython-cd975761846dd17718f4c55afdbc288b0d9cc534.zip cpython-cd975761846dd17718f4c55afdbc288b0d9cc534.tar.gz cpython-cd975761846dd17718f4c55afdbc288b0d9cc534.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/mailbox.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ def _test(): 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 |