handle list values for single hosts

This commit is contained in:
2023-12-29 11:25:05 +01:00
parent e08aaaaa4e
commit b524b2f15d

View File

@@ -115,7 +115,7 @@ def format_data(data: dict) -> str:
formatted_strings = [f"{key.ljust(max_key_length)}: {value}" for key, value in data.items()]
else:
# If only one host, return the single value
formatted_strings = list(data.values())
formatted_strings = [f"{value}" for _, value in data.items()]
return "\n".join(formatted_strings)