index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-04-21 14:37:23 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-04-21 14:37:23 +0200 |
commit | 46b872aa61e0f07fd561a4e14083a30a3d039d38 (patch) | |
tree | f9a65bf288ae7c6967b85f90cb8ba1645bca3afc /archinstall | |
parent | 8d9a542962f8c2f2d0a31c0035b4bf63ef1583cb (diff) |
-rw-r--r-- | archinstall/lib/profiles.py | 7 |
diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 21ec5f6f..95962fd6 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -15,7 +15,7 @@ def grab_url_data(path): response = urllib.request.urlopen(safe_path, context=ssl_context) return response.read() -def list_profiles(filter_irrelevant_macs=True, subpath=''): +def list_profiles(filter_irrelevant_macs=True, subpath='', filter_top_level_profiles=False): # TODO: Grab from github page as well, not just local static files if filter_irrelevant_macs: local_macs = list_interfaces() @@ -63,6 +63,11 @@ def list_profiles(filter_irrelevant_macs=True, subpath=''): cache[profile[:-3]] = {'path' : os.path.join(storage["UPSTREAM_URL"]+subpath, profile), 'description' : profile_list[profile], 'tailored' : tailored} + if filter_top_level_profiles: + for profile in list(cache.keys()): + if Profile(None, profile).is_top_level_profile() is False: + del(cache[profile]) + return cache class Script(): |