Commit 45c0c897 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

build: ignore python utf-8 parsing errors when decoding env vars

Change-Id: I933b14e3c62dd36e6dacb65b91af0944b5c8efc4
parent 81fb5626
......@@ -54,7 +54,7 @@ def findVSLatestDir():
'-property installationPath'
cmd = [vs_where_path] + args
output = subprocess.check_output(' '.join(cmd)).decode('utf-8')
output = subprocess.check_output(' '.join(cmd)).decode('utf-8', errors='ignore')
if output:
return output.splitlines()[0]
......@@ -75,7 +75,7 @@ def getVSEnv(arch='x64', platform='', version=''):
stdout, _ = p.communicate()
out = stdout.decode('utf-8').split("\r\n")[5:-1]
out = stdout.decode('utf-8', errors='ignore').split("\r\n")[5:-1]
return dict(s.split('=', 1) for s in out)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment