mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Standardize string formatting to use .format instead of concat
This commit is contained in:
parent
a3a59af3f8
commit
2ad9f2e35f
18 changed files with 259 additions and 239 deletions
|
@ -38,7 +38,7 @@ class MultiPartForm(object):
|
|||
# Once the list is built, return a string where each
|
||||
# line is separated by '\r\n'.
|
||||
parts = []
|
||||
part_boundary = '--' + self.boundary
|
||||
part_boundary = '--{boundary}'.format(boundary=self.boundary)
|
||||
|
||||
# Add the form fields
|
||||
parts.extend(
|
||||
|
@ -64,6 +64,6 @@ class MultiPartForm(object):
|
|||
# Flatten the list and add closing boundary marker,
|
||||
# then return CR+LF separated data
|
||||
flattened = list(itertools.chain(*parts))
|
||||
flattened.append('--' + self.boundary + '--')
|
||||
flattened.append('--{boundary}--'.format(boundary=self.boundary))
|
||||
flattened.append('')
|
||||
return '\r\n'.join(flattened)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue