[core] Ignore KeyError when updating game info

The retry logic may attempt to update metadata for an asset for
a different platform. This can cause an exception if it's not
also in the "still_needs_update" set.
This commit is contained in:
derrod 2023-05-28 00:08:39 +02:00
parent f97d799e87
commit 4bed49e7e1

View file

@ -439,7 +439,10 @@ class LegendaryCore:
game = Game(app_name=app_name, app_title=eg_meta['title'], metadata=eg_meta, asset_infos=assets[app_name]) game = Game(app_name=app_name, app_title=eg_meta['title'], metadata=eg_meta, asset_infos=assets[app_name])
self.lgd.set_game_meta(game.app_name, game) self.lgd.set_game_meta(game.app_name, game)
games[app_name] = game games[app_name] = game
try:
still_needs_update.remove(app_name) still_needs_update.remove(app_name)
except KeyError:
pass
# setup and teardown of thread pool takes some time, so only do it when it makes sense. # setup and teardown of thread pool takes some time, so only do it when it makes sense.
still_needs_update = {e[0] for e in fetch_list} still_needs_update = {e[0] for e in fetch_list}