mirror of https://git.48k.eu/ogclient
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
parent
9d8a95cc74
commit
8453a8d9ca
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue