From 8f6f118d5f5b39619ff2100e7269971864bed045 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 8 Sep 2017 19:00:48 +0200 Subject: Use platform.uname() instead of os.uname() Portable to non-Unix platforms. --- kconfiglib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 9bc89f3..fe54553 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -67,6 +67,7 @@ email service. Don't wrestle with internal APIs. Tell me what you need and I might add it in a safe way as a client API instead.""" import os +import platform import re import sys @@ -165,7 +166,7 @@ class Config(object): self.m = register_special_symbol(TRISTATE, "m", "m") self.y = register_special_symbol(TRISTATE, "y", "y") # DEFCONFIG_LIST uses this - register_special_symbol(STRING, "UNAME_RELEASE", os.uname()[2]) + register_special_symbol(STRING, "UNAME_RELEASE", platform.uname()[2]) # The symbol with "option defconfig_list" set, containing a list of # default .config files -- cgit v1.2.3