From f7661a88d4f6e3483cbc2667f4c502fad248c49a Mon Sep 17 00:00:00 2001 From: Cielquan Date: Thu, 5 Mar 2020 17:24:32 +0100 Subject: [PATCH] improved output for missing ini keys --- check_jira_tag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_jira_tag.py b/check_jira_tag.py index 6199d39..5cf62bd 100755 --- a/check_jira_tag.py +++ b/check_jira_tag.py @@ -47,7 +47,7 @@ def main() -> int: jira_dict: Dict[str, str] = {} config_file_paths = (Path(Path.home(), ".jira.ini"), Path("jira.ini")) - config_file_names = ("global '.jira.ini'", "repo 'jira.ini'") + config_file_names = ("'~/.jira.ini'", "'/jira.ini'") config_file_configs = (["JIRA_USERNAME", "JIRA_TOKEN"], ["JIRA_URL", "JIRA_TAG"]) for idx, _ in enumerate(config_file_paths): @@ -68,7 +68,7 @@ def main() -> int: try: jira_dict[config_key] = ini_config["jira"][config_key] except KeyError: - print(f"Missing '{config_key}' in 'jira.ini'.") + print(f"Missing '{config_key}' in {config_file_names[idx]}.") exit_code = 1 #: Get commit msg