Skip to content
Snippets Groups Projects
Commit 40c98fb2 authored by Diana Huang's avatar Diana Huang
Browse files

Copy list in a way that is both Py2 and Py3 compatible.

parent a8ea9844
Branches
Tags
No related merge requests found
......@@ -79,7 +79,7 @@ def cache_if_anonymous(*get_parameters):
if response:
# A hack to ensure that the response data is a valid text type for both Python 2 and 3.
response_content = response._container.copy() # pylint: disable=protected-member
response_content = list(response._container) # pylint: disable=protected-member
response.content = b''
for item in response_content:
response.write(item)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment