From 5386b8ccb8af92a4ba63889ccd44f6d18b09b417 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 26 Apr 2024 08:47:31 -0400 Subject: [PATCH] Don't fail if zero results found This was added as a protection against misconfiguration, assuming that if zero issues were found, then there must be a typo in the config. It's actually a legitimate scenario though - we may have a project that for a time will have zero issues open, but on which we don't want the tool to fail hard. --- src/utils/jira.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/utils/jira.py b/src/utils/jira.py index 7770f65..fc9d393 100644 --- a/src/utils/jira.py +++ b/src/utils/jira.py @@ -1,5 +1,3 @@ -import sys - import dogpile.cache import jira @@ -27,7 +25,6 @@ def query_issues( results = _search(jira_client, query, verbose=True) if not results: print(f"No {issue_type} found via query: {query}") - sys.exit(1) return results @@ -50,7 +47,6 @@ def query_child_issues( results = _search(jira_client, query, verbose=True) if not results: print(f"No {issue_type} found via query: {query}") - sys.exit(1) return results