mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[cli] Fix list_saves crash if game metadata is missing
This commit is contained in:
parent
09d39b3fe3
commit
f97d799e87
|
@ -415,7 +415,11 @@ class LegendaryCLI:
|
|||
print('Save games:')
|
||||
for save in sorted(saves, key=lambda a: a.app_name + a.manifest_name):
|
||||
if save.app_name != last_app:
|
||||
game_title = self.core.get_game(save.app_name).app_title
|
||||
if game := self.core.get_game(save.app_name):
|
||||
game_title = game.app_title
|
||||
else:
|
||||
game_title = 'Unknown'
|
||||
|
||||
last_app = save.app_name
|
||||
print(f'- {game_title} ("{save.app_name}")')
|
||||
print(' +', save.manifest_name)
|
||||
|
|
Loading…
Reference in a new issue