BigFile: Fix most errors reported by pyflakes
$ pyflakes product/ERP5/Document/BigFile.py product/ERP5/Document/BigFile.py:27: 'getToolByName' imported but unused product/ERP5/Document/BigFile.py:180: undefined name 'DateTime' product/ERP5/Document/BigFile.py:325: local variable 'filename' is assigned to but never used product/ERP5/Document/BigFile.py:360: local variable 'data' is assigned to but never used getToolByName is not used. For DateTime we add appropriate import. data was there unused from the beginning - from 00f696ee (Allow to upload in chunk.) - for query_range we just return range = [0, current_size-1] and data is left unused. I did not remove filename in # need to return it as attachment filename = self.getStandardFilename(format=format) RESPONSE.setHeader('Cache-Control', 'Private') # workaround for Internet Explorer's bug RESPONSE.setHeader('Accept-Ranges', 'bytes') because as the comment says it tries to workaround some IE bug and I have no clue is filename needed in that case and was forgotten to be appended or it is the other way. Reviewed-by: Romain Courteaud <romain@nexedi.com>
Showing
Please register or sign in to comment