From cd975761846dd17718f4c55afdbc288b0d9cc534 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 14 Dec 1999 22:18:37 +0000 Subject: [PATCH] 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. --- Lib/mailbox.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 3c758ff6e12..108967d19c1 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