Added version check for M1 macs

This commit is contained in:
Rhet Turnbull
2021-01-11 20:27:51 -08:00
parent eec960861e
commit 27f779b16c
3 changed files with 19 additions and 11 deletions

View File

@@ -58,8 +58,16 @@ _DB_TABLE_NAMES = {
}, },
} }
# which major version operating systems have been tested # which version operating systems have been tested
_TESTED_OS_VERSIONS = ["12", "13", "14", "15", "16"] _TESTED_OS_VERSIONS = [
("10", "12"),
("10", "13"),
("10", "14"),
("10", "15"),
("10", "16"),
("11", "0"),
("11", "1"),
]
# Photos 5 has persons who are empty string if unidentified face # Photos 5 has persons who are empty string if unidentified face
_UNKNOWN_PERSON = "_UNKNOWN_" _UNKNOWN_PERSON = "_UNKNOWN_"

View File

@@ -1,3 +1,3 @@
""" version info """ """ version info """
__version__ = "0.39.15" __version__ = "0.39.16"

View File

@@ -85,12 +85,12 @@ class PhotosDB:
# Check OS version # Check OS version
system = platform.system() system = platform.system()
(_, major, _) = _get_os_version() (ver, major, _) = _get_os_version()
if system != "Darwin" or (major not in _TESTED_OS_VERSIONS): if system != "Darwin" or ((ver, major) not in _TESTED_OS_VERSIONS):
logging.warning( logging.warning(
f"WARNING: This module has only been tested with MacOS 10." f"WARNING: This module has only been tested with macOS versions "
f"[{', '.join(_TESTED_OS_VERSIONS)}]: " f"[{', '.join(f'{v}.{m}' for (v, m) in _TESTED_OS_VERSIONS)}]: "
f"you have {system}, OS version: {major}" f"you have {system}, OS version: {ver}.{major}"
) )
if verbose is None: if verbose is None: