mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						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')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user