Skip to content

Commit

Permalink
Replace 'try/except' with an if-statement in issue-closing script.
Browse files Browse the repository at this point in the history
  • Loading branch information
nusbaume committed Oct 7, 2020
1 parent c52728e commit dc75780
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/branch_pr_issue_closer.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ def _main_prog():
print("Issue #{} has been closed.".format(issue_num))
else:
#Extract card id from id dictionary:
try:
if issue_num in proj_issue_card_ids:
card_id = proj_issue_card_ids[issue_num]
except KeyError:
#If there is a key error, then it means the issue
else:
#If issue isn't in dictionary, then it means the issue
#number was never found in the "To do" column, which
#likely means the user either referenced the wrong
#issue number, or the issue was never assigned to the
Expand Down

0 comments on commit dc75780

Please sign in to comment.