From d726851d9c0ae2ffe069b502020a23a37b37198b Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Wed, 31 Jul 2024 10:58:40 -0600 Subject: [PATCH] products.py: Add extra sanity check --- opencore_legacy_patcher/sucatalog/products.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencore_legacy_patcher/sucatalog/products.py b/opencore_legacy_patcher/sucatalog/products.py index eda135be6..5d2b7db0c 100644 --- a/opencore_legacy_patcher/sucatalog/products.py +++ b/opencore_legacy_patcher/sucatalog/products.py @@ -232,7 +232,8 @@ class CatalogProducts: continue try: if packaging.version.parse(installer["Version"]) < _newest_version: - products_copy.pop(products_copy.index(installer)) + if installer in products_copy: + products_copy.pop(products_copy.index(installer)) except packaging.version.InvalidVersion: pass