Skip to content

Commit

Permalink
Fix all_converted_dependencies with missing asset id
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquegemignani committed Aug 15, 2021
1 parent 7a3e9d0 commit ba02194
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion retro_data_structures/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,15 @@ def recursive_dependencies_for(asset_provider: AssetProvider, asset_ids: List[As
def all_converted_dependencies(asset_converter: AssetConverter) -> Dict[AssetId, Set[Dependency]]:
deps_by_asset_id: Dict[AssetId, Set[Dependency]] = {}

def get_asset(asset_id: AssetId):
try:
return asset_converter.converted_assets[asset_id].resource
except KeyError:
raise UnknownAssetId(asset_id) from None

for converted in asset_converter.converted_assets.values():
if converted.id not in deps_by_asset_id:
_internal_dependencies_for(lambda asset_id: asset_converter.converted_assets[asset_id].resource,
_internal_dependencies_for(get_asset,
asset_converter.target_game,
converted.id, converted.type, deps_by_asset_id)

Expand Down

0 comments on commit ba02194

Please sign in to comment.