Update handling methods related to macOS version

This commit is contained in:
Hoang Hong Quan
2024-09-11 03:55:50 +07:00
parent a7ae4ce721
commit 347abb953d
8 changed files with 160 additions and 114 deletions

View File

@@ -163,6 +163,13 @@ class Utils:
# Convert the path to an absolute path and normalize it according to the OS
return str(pathlib.Path(path).resolve())
def parse_darwin_version(self, version):
if not isinstance(version, str):
return version
major, minor, patch = map(int, version.split('.'))
return major, minor, patch
def open_folder(self, folder_path):
if os.name == 'posix':
if 'darwin' in os.uname().sysname.lower():