suppress stderr - second attempt

This commit is contained in:
Graham R Pugh 2020-08-06 21:06:23 +02:00
parent 0253fc94bd
commit 92b0bd8f8f

View File

@ -107,15 +107,9 @@ def get_hw_model():
def get_bridge_id():
"""Gets the local system DeviceID for T2 Macs"""
remotectl_cmd = [
"/usr/libexec/remotectl",
"get-property",
"localbridge",
"HWModel",
"2>/dev/null",
]
remotectl_cmd = ["/usr/libexec/remotectl", "get-property", "localbridge", "HWModel"]
try:
remotectl_output = subprocess.check_output(remotectl_cmd)
remotectl_output = subprocess.check_output(remotectl_cmd, , stderr=subprocess.STDOUT)
bridge_id = remotectl_output.decode("utf8").split(" ")[-1].split("\n")[0]
except subprocess.CalledProcessError as err:
return None