Older versions of python 2.7 can raise a WindowsError instead of a subprocess.CalledProcessError when `uname` does not exist

This commit is contained in:
CensoredUsername 2016-07-01 18:22:24 +02:00
parent 375fa6ef37
commit ad88d50fba
1 changed files with 1 additions and 1 deletions

View File

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