From f97d799e8704c741123f180c19e6ab2dab94e78a Mon Sep 17 00:00:00 2001 From: derrod Date: Sun, 14 May 2023 02:17:29 +0200 Subject: [PATCH] [cli] Fix list_saves crash if game metadata is missing --- legendary/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/legendary/cli.py b/legendary/cli.py index aec3a40..7cf321a 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -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)