Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-08-04 14:50:36 +0200
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-08-04 14:50:36 +0200
commitb2a8fd985746a06ccbdfe87f7f1d4c780fdaaabc (patch)
tree793f5b9cfc02f479bb957b699ef1625bcf98da42 /archinstall
parent0b8a3d9540dd3a9a752a8736701b514a779d636b (diff)
Adding description handling in profiles.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/profiles.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py
index 0e76ba3d..4e14ea67 100644
--- a/archinstall/lib/profiles.py
+++ b/archinstall/lib/profiles.py
@@ -20,7 +20,13 @@ def list_profiles(base='./profiles/'):
for root, folders, files in os.walk(base):
for file in files:
if os.path.splitext(file)[1] == '.py':
- cache[file] = os.path.join(root, file)
+ description = ''
+ with open(os.path.join(root, file), 'r') as fh:
+ first_line = fh.readline()
+ if first_line[0] == '#':
+ description = first_line.strip()
+
+ cache[file] = {'path' : os.path.join(root, file), 'description' : ''}
break
return cache