From: Guido van Rossum Date: Tue, 14 Dec 1999 22:18:37 +0000 (+0000) Subject: Only set msg.fp to None when there are no extra arguments; if there X-Git-Tag: v1.6a1~635 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd975761846dd17718f4c55afdbc288b0d9cc534;p=python 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 3c758ff6e1..108967d19c 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