Fixes for bokchoy running in python3.

This commit is contained in:
Feanil Patel
2019-09-12 08:40:03 -04:00
parent 20dc162375
commit d1728b3d6a
2 changed files with 8 additions and 0 deletions

View File

@@ -230,6 +230,12 @@ def _write_files(output_root, contents, generated_suffix_map=None):
not_file = not output_file.isfile()
# Sometimes content is already unicode and sometimes it's not
# so we add this conditional here to make sure that below we're
# always working with streams of bytes.
if not isinstance(file_content, six.binary_type):
file_content = file_content.encode('utf-8')
# not_file is included to short-circuit this check, because
# read_md5 depends on the file already existing
write_file = not_file or output_file.read_md5() != hashlib.md5(file_content).digest()

View File

@@ -61,6 +61,8 @@ passenv =
XDIST_WORKER_SECURITY_GROUP
XDIST_WORKER_SUBNET
PYTHON_VERSION
LMS_CFG
STUDIO_CFG
deps =
django111: -r requirements/edx/django.txt