aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-02-13 19:44:03 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-02-13 19:44:03 +0530
commit80e55c7ce42fae08c6517facab686913c0c4eef8 (patch)
treec830bdb6f1b67c350d005545313b62c17e51d829
parenta164176876bb6abccf729eb5d6334e3c22230103 (diff)
parent939f409042b80c7e4e7770674ed9b55074b04c5d (diff)
downloadservo-80e55c7ce42fae08c6517facab686913c0c4eef8.tar.gz
servo-80e55c7ce42fae08c6517facab686913c0c4eef8.zip
Auto merge of #9624 - Jayflux:hotfix/9597, r=KiChjang
use python's built in platform module for detection, for more accurac… …y and cross platform support Fixes #9597. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9624) <!-- Reviewable:end -->
-rw-r--r--python/servo/command_base.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index d43c3ab4eda..ece5e134141 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -13,6 +13,8 @@ import contextlib
import subprocess
from subprocess import PIPE
import sys
+import platform
+
import toml
from mach.registrar import Registrar
@@ -32,7 +34,7 @@ def cd(new_path):
def host_triple():
- os_type = subprocess.check_output(["uname", "-s"]).strip().lower()
+ os_type = platform.system().lower()
if os_type == "linux":
os_type = "unknown-linux-gnu"
elif os_type == "darwin":
@@ -44,7 +46,7 @@ def host_triple():
else:
os_type = "unknown"
- cpu_type = subprocess.check_output(["uname", "-m"]).strip().lower()
+ cpu_type = platform.machine().lower()
if cpu_type in ["i386", "i486", "i686", "i768", "x86"]:
cpu_type = "i686"
elif cpu_type in ["x86_64", "x86-64", "x64", "amd64"]: