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.
This commit is contained in:
Guido van Rossum 1999-12-14 22:18:37 +00:00
parent 12c6e2d497
commit cd97576184
1 changed files with 2 additions and 1 deletions

View File

@ -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