From d99b804386ae528439ba7d5cf7d4f4502c41c117 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 29 Nov 2020 20:20:47 +0000 Subject: Added a bit more detail to HTTP errors. --- archinstall/lib/profiles.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archinstall') diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 8a842cce..2cf96eb2 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -43,13 +43,14 @@ def list_profiles(filter_irrelevant_macs=True): # Grab profiles from upstream URL if storage['PROFILE_DB']: + profiles_url = os.path.join(storage["UPSTREAM_URL"], storage['PROFILE_DB']) try: - profile_list = json.loads(grab_url_data(os.path.join(storage["UPSTREAM_URL"], storage['PROFILE_DB']))) + profile_list = json.loads(grab_url_data(profiles_url)) except urllib.error.HTTPError as err: - print(f'Error: Listing profiles on URL "{storage["UPSTREAM_URL"]}" resulted in:', err) + print(f'Error: Listing profiles on URL "{profiles_url}" resulted in:', err) return cache except: - print(f'Error: Could not decode "{storage["UPSTREAM_URL"]}" result as JSON:', err) + print(f'Error: Could not decode "{profiles_url}" result as JSON:', err) return cache for profile in profile_list: -- cgit v1.2.3-70-g09d2