From e88c6b8a59dfd947f6cf3c7eac9c92519ab781a3 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sun, 23 Jan 2022 18:06:19 -0800 Subject: [PATCH] Bug fix for get_photos_library_version --- osxphotos/_version.py | 2 +- osxphotos/photosdb/photosdb_utils.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/osxphotos/_version.py b/osxphotos/_version.py index b51dee42..db8a4744 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,3 +1,3 @@ """ version info """ -__version__ = "0.44.11" +__version__ = "0.44.12" diff --git a/osxphotos/photosdb/photosdb_utils.py b/osxphotos/photosdb/photosdb_utils.py index 5bc9b521..d92dd5f0 100644 --- a/osxphotos/photosdb/photosdb_utils.py +++ b/osxphotos/photosdb/photosdb_utils.py @@ -113,9 +113,8 @@ def get_photos_library_version(library_path): return 3 if db_ver == int(_PHOTOS_4_VERSION): return 4 - if db_ver != int(_PHOTOS_5_VERSION): - raise UnknownLibraryVersion(f"db_ver = {db_ver}") + # assume it's a Photos 5+ library, get the model version to determine which version model_ver = get_model_version(str(library_path / "database" / "Photos.sqlite")) model_ver = int(model_ver) if _PHOTOS_5_MODEL_VERSION[0] <= model_ver <= _PHOTOS_5_MODEL_VERSION[1]: