Skip to content

Commit

Permalink
Ensure data exist in json files
Browse files Browse the repository at this point in the history
  • Loading branch information
nvdaes committed Jul 3, 2023
1 parent a3b090f commit dfe1b22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/_addonStore/dataManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ def _getCachedAddonData(self, cacheFilePath: str) -> Optional[CachedAddonsModel]
if not cacheData:
return None
try:
data = cacheData["data"]
cacheHash = cacheData["cacheHash"]
cachedLanguage = cacheData["cachedLanguage"]
nvdaAPIVersion = cacheData["nvdaAPIVersion"]
except KeyError:
return None
return CachedAddonsModel(
cachedAddonData=_createStoreCollectionFromJson(cacheData["data"]),
cachedAddonData=_createStoreCollectionFromJson(data),
cacheHash=cacheHash,
cachedLanguage=cachedLanguage,
nvdaAPIVersion=tuple(nvdaAPIVersion), # loads as list,
Expand Down

0 comments on commit dfe1b22

Please sign in to comment.