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: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd975761846dd17718f4c55afdbc288b0d9cc534;p=thirdparty%2FPython%2Fcpython.git 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 3c758ff6e12d..108967d19c19 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