From 77e37823748acc30ea74d75da2c7d20dca4acfcd Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 29 Nov 2020 19:52:14 +0000 Subject: Forgot a few imports --- archinstall/lib/profiles.py | 6 +++--- archinstall/lib/storage.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'archinstall') diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 021c48d6..07bd1c26 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -5,7 +5,7 @@ from .general import multisplit, sys_command, log from .exceptions import * from .networking import * from .output import log, LOG_LEVELS -from .storage import storage, UPSTREAM_URL, PROFILE_DB +from .storage import storage, UPSTREAM_URL, PROFILE_DB, PROFILE_PATH def grab_url_data(path): safe_path = path[:path.find(':')+1]+''.join([item if item in ('/', '?', '=', '&') else urllib.parse.quote(item) for item in multisplit(path[path.find(':')+1:], ('/', '?', '=', '&'))]) @@ -42,9 +42,9 @@ def list_profiles(filter_irrelevant_macs=True): break # Grab profiles from upstream URL - if UPSTREAM_DB: + if PROFILE_DB: try: - profile_list = json.loads(grab_url_data(os.path.join(UPSTREAM_URL, UPSTREAM_DB))) + profile_list = json.loads(grab_url_data(os.path.join(UPSTREAM_URL, PROFILE_DB))) except urllib.error.UTTPError as err: print(f'Error: Listing profiles on URL "{UPSTREAM_URL}" resulted in:', err) return cache diff --git a/archinstall/lib/storage.py b/archinstall/lib/storage.py index bb41c999..11ceafee 100644 --- a/archinstall/lib/storage.py +++ b/archinstall/lib/storage.py @@ -1,3 +1,5 @@ +import os + storage = {} # There's a few scenarios of execution: -- cgit v1.2.3-54-g00ecf