mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
packages: cmd_list_{devices,flavours}(): error on empty results
This commit is contained in:
parent
34ffbfb0bf
commit
c0b3b15260
2 changed files with 5 additions and 1 deletions
|
@ -158,7 +158,9 @@ def get_profile_device(profile_name: Optional[str] = None, hint_or_set_arch: boo
|
|||
|
||||
@click.command(name='list')
|
||||
def cmd_devices_list():
|
||||
'list the available flavours and descriptions'
|
||||
'list the available devices and descriptions'
|
||||
devices = get_devices()
|
||||
if not devices:
|
||||
raise Exception("No devices found!")
|
||||
for d in sorted(devices.keys()):
|
||||
print(devices[d])
|
||||
|
|
|
@ -81,5 +81,7 @@ def get_profile_flavour(profile_name: Optional[str] = None) -> Flavour:
|
|||
def cmd_flavours_list():
|
||||
'list information about available flavours'
|
||||
flavours = get_flavours()
|
||||
if not flavours:
|
||||
raise Exception("No flavours found!")
|
||||
for f in flavours.values():
|
||||
print(f)
|
||||
|
|
Loading…
Add table
Reference in a new issue