Skip to content
Snippets Groups Projects
Commit 92481ac9 authored by John Chilton's avatar John Chilton
Browse files

Python 3 fix for integration tests.

parent a9851075
No related branches found
No related tags found
No related merge requests found
......@@ -417,8 +417,10 @@ def __write_to_file(path, contents):
dirname = os.path.dirname(path)
if not os.path.exists(dirname):
os.makedirs(dirname)
with open(path, "wb") as file:
file.write(contents)
with open(path, "wb") as f:
if not isinstance(contents, binary_type):
contents = binary_type(contents, "UTF-8")
f.write(contents)
def __makedirs(directories):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment