[videogames] Use reqeusts exceptions
All checks were successful
build & deploy / test (push) Successful in 1m52s
build & deploy / deploy (push) Successful in 24s

This commit is contained in:
2026-03-22 15:47:04 -04:00
parent 44eb193b33
commit 1a2c39b4d3

View File

@ -30,7 +30,7 @@ def scrape_game_name_from_adb(name: str) -> str:
url = MAME_LOOKUP_URL.format(query=name)
try:
resp = requests.get(url, headers=headers)
except ConnectionError:
except requests.ConnectionError:
raise GameNotFound(f"Lookup failed with code {resp.status_code}")
if not resp.ok:
raise GameNotFound(f"Lookup failed with code {resp.status_code}")