enhancement(src/risotto/image.py): better messages

close #11
This commit is contained in:
egarette@silique.fr 2023-08-01 14:58:22 +02:00
parent 55b0140edd
commit 8e6dd476bf

View file

@ -230,12 +230,12 @@ def valid_mandatories(config):
var_server_name = config.option(path_server_name).description()
if server_name != var_server_name:
server_name = var_server_name
title = f'=== Missing variables for {server_name} ==='
title = f'=== Missing variables for "{server_name.split(".", 1)[0]}" ==='
text = mandatory_option.doc()
msg = f' - {text} ({path})'
supplier = mandatory_option.information.get('supplier', None)
if supplier:
msg += f' you could add a service that provides "{supplier}"'
if supplier and not ':' in supplier:
msg += f' you should add a service that provides "{supplier}"'
if mandatory_option.isfollower():
leader = mandatory_option.leader()
try: