[Sjoerd Mullender]

Fixed infinite loop when a message ends prematurely in some
circumstances.
This commit is contained in:
Guido van Rossum 1998-08-07 15:26:56 +00:00
parent 5ff1761d3f
commit 1015be3812
1 changed files with 8 additions and 0 deletions

View File

@ -398,6 +398,14 @@ def mimify_part(ifile, ofile, is_mime):
break
ofile.write(line)
continue
# unexpectedly no multipart separator--copy rest of file
while 1:
line = ifile.readline()
if not line:
return
if must_quote_body:
line = mime_encode(line, 0)
ofile.write(line)
def mimify(infile, outfile):
'''Convert 8bit parts of a MIME mail message to quoted-printable.'''