scripts/lib/setup_venv.py: Use universal_newlines=True.

In python 3, subprocess uses bytes for input and output if
universal_newlines=False (the default).  It uses str for input and
output if universal_newlines=True.
Since we're dealing with strings here, add universal_newlines=True
to subprocess.check_output calls.
This commit is contained in:
Eklavya Sharma 2016-07-03 01:11:13 +05:30 committed by Tim Abbott
parent ce6ddd574a
commit 7e020e3dae
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ def setup_virtualenv(target_venv_path, requirements_file, virtualenv_args=None):
# Check if a cached version already exists
path = os.path.join(ZULIP_PATH, 'scripts', 'lib', 'hash_reqs.py')
output = subprocess.check_output([path, requirements_file])
output = subprocess.check_output([path, requirements_file], universal_newlines=True)
sha1sum = output.split()[0]
if target_venv_path is None:
cached_venv_path = os.path.join(VENV_CACHE_PATH, sha1sum, 'venv')