From 8453a8d9caafbd7a484fd990af5f89c83da7991f Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Mon, 15 Jul 2024 09:39:02 +0200 Subject: 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. --- src/utils/tiptorrent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils') diff --git a/src/utils/tiptorrent.py b/src/utils/tiptorrent.py index 8fc1631..079a41f 100644 --- a/src/utils/tiptorrent.py +++ b/src/utils/tiptorrent.py @@ -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 -- cgit v1.2.3-18-g5258