def _return_response(self, file_src, basename):
        """Read the generated pdf and return it in a django HttpResponse."""
        # Open the file created by PhantomJS
        return_file = None
        with open(file_src, 'rb') as f:
            return_file = f.readlines()

        response = HttpResponse(
            return_file,
            content_type='application/pdf'
        )
        content_disposition = (basename) % 'attachment; filename=%s.pdf'
        response['Content-Disposition'] = content_disposition

        if not self.KEEP_PDF_FILES:  # remove generated pdf files
            os.remove(file_src)

        return response
dataset/ETHPy150Open BananaDesk/django-phantom-pdf/phantom_pdf/generator.py/RequestToPDF._return_response/swapped operands of `%`