super(DarwinLocalTI, self).__init__(full_config)
def is_host_macosx(self):
- name = subprocess.check_output(['sw_vers', '-productName']).strip()
+ name = subprocess.check_output(['sw_vers', '-productName']).decode().strip()
return name == "Mac OS X"
def get_macosx_version(self):
assert self.is_host_macosx()
- version = subprocess.check_output(
- ['sw_vers', '-productVersion']).strip()
+ version = subprocess.check_output(['sw_vers', '-productVersion']).decode().strip()
version = re.sub(r'([0-9]+\.[0-9]+)(\..*)?', r'\1', version)
return version