upload: Add type: ignore for mimetypes.guess_type stubs issue.

This commit is contained in:
Tim Abbott
2016-09-19 21:40:08 -07:00
parent 6b3f945a7e
commit 939528303d

View File

@@ -42,7 +42,8 @@ def serve_local(request, path_id):
if local_path is None:
return HttpResponseNotFound('<p>File not found</p>')
filename = os.path.basename(local_path)
response = FileResponse(open(local_path, 'rb'), content_type = mimetypes.guess_type(filename))
response = FileResponse(open(local_path, 'rb'),
content_type = mimetypes.guess_type(filename)) # type: ignore # https://github.com/python/typeshed/issues/559
return response
@has_request_variables