Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/profiles.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-22 08:55:54 +0000
committerGitHub <noreply@github.com>2021-04-22 08:55:54 +0000
commit331bb0789b8dad7e0fae4447311c23adaebc6c81 (patch)
tree55f3d5ee12909ceb3692571fe6ecbe6914010f53 /archinstall/lib/profiles.py
parentbf9f7bdb169b3a70df2e52421145bb02fde608dd (diff)
parent4d65639724e1402ef584221bbbb0e80dba827ab7 (diff)
Merge pull request #325 from SecondThundeR/generic-select-update
Rework of the generic_select function and fixes for various input checks
Diffstat (limited to 'archinstall/lib/profiles.py')
-rw-r--r--archinstall/lib/profiles.py7
1 files changed, 6 insertions, 1 deletions
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():