utils: clean up error reporting related to checksum

When checksum is not available, it displays:

(2024-07-15 09:04:14) ogClient: [ERROR] - URL error when fetching checksum: Not Found

"URL error" is leaking an internal implementation details, reword this report.
master
OpenGnSys Support Team 2024-07-15 09:39:02 +02:00
parent 9d8a95cc74
commit 8453a8d9ca
1 changed files with 2 additions and 2 deletions

View File

@ -35,9 +35,9 @@ def tip_fetch_csum(tip_addr, image_name):
with urllib.request.urlopen(f'{url}') as resp:
r = resp.readline().rstrip().decode('utf-8')
except urllib.error.URLError as e:
raise OgError(f'URL error when fetching checksum: {e.reason}') from e
raise OgError(f'Error fetching checksum file from {url}: {e.reason}') from e
except urllib.error.HTTPError as e:
raise OgError(f'HTTP Error when fetching checksum: {e.reason}') from e
raise OgError(f'Error fetching checksum file via HTTP from {url}: {e.reason}') from e
return r