mirror of https://github.com/zulip/zulip.git
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:
parent
ce6ddd574a
commit
7e020e3dae
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue