Skip to content

Commit d9e8a67

Browse files
authored
Auto merge of #34597 - CensoredUsername:bootstrap-fix, r=alexcrichton
Support more python 2.7 versions in bootstrap.py It seems python broke compatability between 2.7.9 and 2.7.12 as on the former a WindowsError was raised while on the latter a subprocess.CalledProcessError was raised while testing for the existence of uname. As a WindowsError being thrown obviously indicates we're running on windows, this should probably be accepted too.
2 parents ecbfa47 + ad88d50 commit d9e8a67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def build_triple(self):
265265
try:
266266
ostype = subprocess.check_output(['uname', '-s']).strip()
267267
cputype = subprocess.check_output(['uname', '-m']).strip()
268-
except subprocess.CalledProcessError:
268+
except (subprocess.CalledProcessError, WindowsError):
269269
if sys.platform == 'win32':
270270
return 'x86_64-pc-windows-msvc'
271271
err = "uname not found"

0 commit comments

Comments
 (0)