]> granicus.if.org Git - python/commitdiff
Only set msg.fp to None when there are no extra arguments; if there
authorGuido van Rossum <guido@python.org>
Tue, 14 Dec 1999 22:18:37 +0000 (22:18 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 14 Dec 1999 22:18:37 +0000 (22:18 +0000)
are, we must keep the file around so we can print the body.

Lib/mailbox.py

index 3c758ff6e12d12e177e06ab2145a1b6a9e5974e3..108967d19c1930dfb3c09dc83a2715f7c266213f 100755 (executable)
@@ -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