Skip to content

Commit

Permalink
fix: Use requests' built-in method to raise exc
Browse files Browse the repository at this point in the history
  • Loading branch information
MimmyJau authored and Ned Batchelder committed Jul 18, 2023
1 parent 0bb8db6 commit 9b46aff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion barcalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def get_defaults_from_tutor():

if resp.status_code == 200:
return yaml.safe_load(resp.text)
raise RuntimeError(f"Couldn't fetch {url}: {resp.status_code}")
resp.raise_for_status()

def parse_version_number(line):
"""
Expand Down

0 comments on commit 9b46aff

Please sign in to comment.