From 59b63d08fe7f3bdf011b3351f19756f6acc5480c Mon Sep 17 00:00:00 2001 From: Dup4 Date: Sat, 11 Nov 2023 08:17:29 +0800 Subject: [PATCH] fix: change exit to raise Signed-off-by: Dup4 --- domjudge_utility/dump.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/domjudge_utility/dump.py b/domjudge_utility/dump.py index 419e8f5..147be89 100644 --- a/domjudge_utility/dump.py +++ b/domjudge_utility/dump.py @@ -93,7 +93,8 @@ def send_request(self, url, params={}): if res.status_code != 200: self.logger.error('An error occurred during request GET {}, errcode:{}'.format( url, res.status_code)) - exit() + raise RuntimeError( + "fetch failed. [url={}] [status_code={}]".format(url, res.status_code)) return res