mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[cli] Check for empty list when activating Origin games
Prevents `IndexError` from occurring when Origin games list is empty.
This commit is contained in:
parent
fc73c1d4bf
commit
496bda3345
|
@ -2013,6 +2013,10 @@ class LegendaryCLI:
|
|||
na_games, _ = self.core.get_non_asset_library_items(skip_ue=True)
|
||||
origin_games = [game for game in na_games if game.third_party_store == 'Origin']
|
||||
|
||||
if not origin_games:
|
||||
logger.info('No redeemable games found.')
|
||||
return
|
||||
|
||||
logger.info(f'Found {len(origin_games)} game(s) to redeem:')
|
||||
for game in origin_games:
|
||||
logger.info(f' - {game.app_title}')
|
||||
|
|
Loading…
Reference in a new issue