Skip to content

Commit

Permalink
Terminate script on failure to get last report.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam authored and greenbonebot committed Jul 30, 2024
1 parent f50e274 commit 94d6a4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/create-consolidated-report.gmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later

import sys
from argparse import ArgumentParser, Namespace, RawTextHelpFormatter
from datetime import date
from typing import List, Tuple
Expand Down Expand Up @@ -239,7 +240,8 @@ def get_last_report_in_time_period(
if reports_id:
reports.append(reports_id[0])
else:
print(f"Failed to get report for task {task_id}")
print(f"Failed to get report for task {task_id}", file=sys.stderr)
sys.exit(1)
return reports


Expand Down

0 comments on commit 94d6a4f

Please sign in to comment.