From ea0360e3b4e6ffa81b35549bb2efaba7b283669e Mon Sep 17 00:00:00 2001 From: CorpNewt <12772521+corpnewt@users.noreply.github.com> Date: Tue, 21 Jan 2025 13:01:00 -0600 Subject: [PATCH] Don't retain packages and size keys in cache - those are dynamic --- gibMacOS.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gibMacOS.py b/gibMacOS.py index a359157..4c96468 100755 --- a/gibMacOS.py +++ b/gibMacOS.py @@ -352,7 +352,13 @@ class gibMacOS: # If we were able to resolve the SMD URL - or it didn't exist, save it to the cache if smd or not plist_dict.get("Products",{}).get(prod,{}).get("ServerMetadataURL",""): prod_changed = True - self.prod_cache[prod] = prodd + # Create a temp prod dict so we can save all but the packages and + # size keys - as those are determined based on self.find_recovery + temp_prod = {} + for key in prodd: + if key in ("packages","size"): continue + temp_prod[key] = prodd[key] + self.prod_cache[prod] = temp_prod # Log the product print_prod(prodd,prod_list) # Try saving the cache for later