Skip to content

Commit

Permalink
improved output for missing ini keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Cielquan committed Mar 5, 2020
1 parent 650c1ae commit f7661a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check_jira_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'", "'<repo>/jira.ini'")
config_file_configs = (["JIRA_USERNAME", "JIRA_TOKEN"], ["JIRA_URL", "JIRA_TAG"])

for idx, _ in enumerate(config_file_paths):
Expand All @@ -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
Expand Down

0 comments on commit f7661a8

Please sign in to comment.