fix portability issue in error handling of build_triple

This commit is contained in:
Shawn Walker-Salas 2017-02-12 11:24:06 -08:00
parent 4a618fee1e
commit 3807e1f393

View File

@ -315,7 +315,7 @@ class RustBuild(object):
try:
ostype = subprocess.check_output(['uname', '-s']).strip().decode(default_encoding)
cputype = subprocess.check_output(['uname', '-m']).strip().decode(default_encoding)
except subprocess.CalledProcessError:
except (subprocess.CalledProcessError, OSError):
if sys.platform == 'win32':
return 'x86_64-pc-windows-msvc'
err = "uname not found"