diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/includes/email-dir.py | 2 | ||||
-rw-r--r-- | Doc/includes/email-simple.py | 2 | ||||
-rw-r--r-- | Doc/includes/email-unpack.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Doc/includes/email-dir.py b/Doc/includes/email-dir.py index 0dcfbfb..2fc1570 100644 --- a/Doc/includes/email-dir.py +++ b/Doc/includes/email-dir.py @@ -41,7 +41,7 @@ must be running an SMTP server. directory = '.' # Create the message msg = EmailMessage() - msg['Subject'] = 'Contents of directory %s' % os.path.abspath(directory) + msg['Subject'] = f'Contents of directory {os.path.abspath(directory)}' msg['To'] = ', '.join(args.recipients) msg['From'] = args.sender msg.preamble = 'You will not see this in a MIME-aware mail reader.\n' diff --git a/Doc/includes/email-simple.py b/Doc/includes/email-simple.py index f69ef40..07dc30f 100644 --- a/Doc/includes/email-simple.py +++ b/Doc/includes/email-simple.py @@ -12,7 +12,7 @@ with open(textfile) as fp: # me == the sender's email address # you == the recipient's email address -msg['Subject'] = 'The contents of %s' % textfile +msg['Subject'] = f'The contents of {textfile}' msg['From'] = me msg['To'] = you diff --git a/Doc/includes/email-unpack.py b/Doc/includes/email-unpack.py index e0a7f01..c8cb0be 100644 --- a/Doc/includes/email-unpack.py +++ b/Doc/includes/email-unpack.py @@ -43,7 +43,7 @@ Unpack a MIME message into a directory of files. if not ext: # Use a generic bag-of-bits extension ext = '.bin' - filename = 'part-%03d%s' % (counter, ext) + filename = f'part-{counter:03d}{ext}' counter += 1 with open(os.path.join(args.directory, filename), 'wb') as fp: fp.write(part.get_payload(decode=True)) |