https://stackoverflow.com/questions/16511337/correct-way-to-try-except-using-python-requests-module
try:
r = requests.get('http://www.google.com/nothere')
r.raise_for_status()
except requests.exceptions.HTTPError as err:
raise SystemExit(err)
No comments:
Post a Comment