Skip missing hidden key
This commit is contained in:
@@ -20,19 +20,19 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
from abc import abstractmethod
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from json import JSONDecodeError
|
from json import JSONDecodeError
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from time import time
|
from time import time
|
||||||
from typing import Optional, TypedDict, Iterable
|
from typing import Iterable, Optional, TypedDict
|
||||||
from abc import abstractmethod
|
|
||||||
|
|
||||||
from src import shared
|
from src import shared
|
||||||
from src.game import Game
|
from src.game import Game
|
||||||
from src.importer.sources.location import Location
|
from src.importer.sources.location import Location
|
||||||
from src.importer.sources.source import (
|
from src.importer.sources.source import (
|
||||||
SourceIterationResult,
|
|
||||||
SourceIterable,
|
SourceIterable,
|
||||||
|
SourceIterationResult,
|
||||||
URLExecutableSource,
|
URLExecutableSource,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -311,9 +311,10 @@ class HeroicSourceIterable(SourceIterable):
|
|||||||
# Get the hidden app names
|
# Get the hidden app names
|
||||||
try:
|
try:
|
||||||
store = path_json_load(self.source.config_location["store_config.json"])
|
store = path_json_load(self.source.config_location["store_config.json"])
|
||||||
self.hidden_app_names = {
|
if "hidden" in store["games"].keys():
|
||||||
game["appName"] for game in store["games"]["hidden"]
|
self.hidden_app_names = {
|
||||||
}
|
game["appName"] for game in store["games"]["hidden"]
|
||||||
|
}
|
||||||
except (OSError, JSONDecodeError, KeyError, TypeError) as error:
|
except (OSError, JSONDecodeError, KeyError, TypeError) as error:
|
||||||
logging.error("Invalid Heroic store file", exc_info=error)
|
logging.error("Invalid Heroic store file", exc_info=error)
|
||||||
raise InvalidStoreFileError() from error
|
raise InvalidStoreFileError() from error
|
||||||
|
|||||||
Reference in New Issue
Block a user