diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-03-27 12:24:14 +0000 |
---|---|---|
committer | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2019-04-11 13:58:33 +0000 |
commit | 3ec65d9b4a21d5e503b7edfe9e691aa4e9e6714f (patch) | |
tree | 343e4ca19953dfdb1bbdb6832a6c0dcd593c0821 /buildstream/_platform/platform.py | |
parent | 16079b49f10dc561749a429842094e066a699f5f (diff) | |
download | buildstream-aevri/platform_uname.tar.gz |
Use uname field names instead of indicesaevri/platform_uname
platform.uname() returns a namedtuple of "system, node, release,
version, machine, and processor". Use these slightly clearer names
instead of the magic numbers.
Diffstat (limited to 'buildstream/_platform/platform.py')
-rw-r--r-- | buildstream/_platform/platform.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_platform/platform.py b/buildstream/_platform/platform.py index 4c637ffa5..dba60ddca 100644 --- a/buildstream/_platform/platform.py +++ b/buildstream/_platform/platform.py @@ -76,7 +76,7 @@ class Platform(): @staticmethod def get_host_os(): - return platform.uname()[0] + return platform.uname().system # canonicalize_arch(): # @@ -125,7 +125,7 @@ class Platform(): @staticmethod def get_host_arch(): # get the hardware identifier from uname - uname_machine = platform.uname()[4] + uname_machine = platform.uname().machine return Platform.canonicalize_arch(uname_machine) ################################################################## |