Give feedback if no modules found via the freeze command.

This commit is contained in:
Nicholas H.Tollervey 2019-09-06 11:58:57 +01:00
parent be4b6b240f
commit 38e1bfda99
No known key found for this signature in database
GPG key ID: FD2A04F69841B6FA

View file

@ -498,10 +498,14 @@ def freeze(): # pragma: no cover
device.
"""
logger.info("Freeze")
for module in find_modules():
output = "{}=={}".format(module.name, module.device_version)
click.echo(output)
logger.info(output)
modules = find_modules()
if modules:
for module in modules:
output = "{}=={}".format(module.name, module.device_version)
click.echo(output)
logger.info(output)
else:
click.echo("No modules found on the device.")
@main.command()