Skip to content

Commit

Permalink
fix: change exit to raise
Browse files Browse the repository at this point in the history
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
  • Loading branch information
Dup4 committed Nov 11, 2023
1 parent 7b3d68f commit 59b63d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion domjudge_utility/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 59b63d0

Please sign in to comment.