Fix PEP8 variable and argument names should be snake_case

This commit is contained in:
Labrys of Knossos 2018-12-26 11:38:01 -05:00 committed by Lizband
parent 985f004e32
commit c2f0f3affc
2 changed files with 7 additions and 7 deletions

View file

@ -23,9 +23,9 @@ class MultiPartForm(object):
self.form_fields.append((name, value))
return
def add_file(self, fieldname, filename, fileHandle, mimetype=None):
def add_file(self, fieldname, filename, file_handle, mimetype=None):
"""Add a file to be uploaded."""
body = fileHandle.read()
body = file_handle.read()
if mimetype is None:
mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
self.files.append((fieldname, filename, mimetype, body))