Commit 928051fb authored by Fred Drake's avatar Fred Drake

The "%" character does not need to be escaped in verbatim environments.

This closes SF bug #517811.
parent 7bc6f7ac
...@@ -353,7 +353,7 @@ fp.close() ...@@ -353,7 +353,7 @@ fp.close()
# me == the sender's email address # me == the sender's email address
# you == the recipient's email address # you == the recipient's email address
msg['Subject'] = 'The contents of \%s' \% textfile msg['Subject'] = 'The contents of %s' % textfile
msg['From'] = me msg['From'] = me
msg['To'] = you msg['To'] = you
...@@ -480,7 +480,7 @@ def main(): ...@@ -480,7 +480,7 @@ def main():
# Create the enclosing (outer) message # Create the enclosing (outer) message
outer = MIMEBase('multipart', 'mixed') outer = MIMEBase('multipart', 'mixed')
outer['Subject'] = 'Contents of directory \%s' \% os.path.abspath(dir) outer['Subject'] = 'Contents of directory %s' % os.path.abspath(dir)
outer['To'] = sender outer['To'] = sender
outer['From'] = COMMASPACE.join(recips) outer['From'] = COMMASPACE.join(recips)
outer.preamble = 'You will not see this in a MIME-aware mail reader.\n' outer.preamble = 'You will not see this in a MIME-aware mail reader.\n'
...@@ -617,7 +617,7 @@ def main(): ...@@ -617,7 +617,7 @@ def main():
if not ext: if not ext:
# Use a generic bag-of-bits extension # Use a generic bag-of-bits extension
ext = '.bin' ext = '.bin'
filename = 'part-\%03d\%s' \% (counter, ext) filename = 'part-%03d%s' % (counter, ext)
counter += 1 counter += 1
fp = open(os.path.join(dir, filename), 'wb') fp = open(os.path.join(dir, filename), 'wb')
fp.write(part.get_payload(decode=1)) fp.write(part.get_payload(decode=1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment