[cli] Do not print empty info items

This commit is contained in:
derrod 2021-10-10 12:36:16 +02:00
parent 8da4b55987
commit 9693a0b8ff

View file

@ -1559,15 +1559,18 @@ class LegendaryCLI:
else: else:
print(f'- {item.name}: {item.value}') print(f'- {item.name}: {item.value}')
print('\nGame Information:') if info_items['game']:
for info_item in info_items['game']: print('\nGame Information:')
print_info_item(info_item) for info_item in info_items['game']:
print('\nInstallation information:') print_info_item(info_item)
for info_item in info_items['install']: if info_items['install']:
print_info_item(info_item) print('\nInstallation information:')
print('\nManifest information:') for info_item in info_items['install']:
for info_item in info_items['manifest']: print_info_item(info_item)
print_info_item(info_item) if info_items['manifest']:
print('\nManifest information:')
for info_item in info_items['manifest']:
print_info_item(info_item)
else: else:
json_out = dict(game=dict(), install=dict(), manifest=dict()) json_out = dict(game=dict(), install=dict(), manifest=dict())
for info_item in info_items['game']: for info_item in info_items['game']: