From 5e530c0056fc504727288eb96c45c8b9472bc1a8 Mon Sep 17 00:00:00 2001 From: pythoninja Date: Fri, 15 Dec 2023 12:00:22 +0300 Subject: [PATCH] refactor: improve error message with yaml (#82) --- sshgen/utils/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshgen/utils/file.py b/sshgen/utils/file.py index 4f92525..8bc352a 100644 --- a/sshgen/utils/file.py +++ b/sshgen/utils/file.py @@ -16,7 +16,7 @@ def get_hosts_path(file_path: str) -> Path: CommonUtils.check_and_exit(resolved_path.exists(), f'Ansible hosts file does not exists at {resolved_path}. Exiting...') CommonUtils.check_and_exit(FileUtils.is_yaml_file(resolved_path), - 'Ansible hosts file is not a yaml file. Valid extensions are: yaml or yml.' + 'Ansible hosts file is not a yaml file. Valid extensions are: yaml or yml. ' 'Exiting...') CommonUtils.check_and_exit(not FileUtils.is_empty(resolved_path), f'Ansible hosts file {resolved_path} is empty. Exiting...')