Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-06-09 21:38:03 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-06-09 21:38:03 +0200
commit0bd4beceba870534c60e46408fdb03a661d44af7 (patch)
treecfde1be9eaf2160467b204e414097fedadf3c6fd /archinstall.py
parent5cdbb79ed684c492c6e791101c838e8a9ca42712 (diff)
Moved sorted logic for partitions
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archinstall.py b/archinstall.py
index c520c021..2f1c0a6a 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -303,7 +303,7 @@ def grab_partitions(dev):
r = json.loads(o.decode('UTF-8'))
if len(r['blockdevices']) and 'children' in r['blockdevices'][0]:
- for part in sorted(r['blockdevices'][0]['children']):
+ for part in r['blockdevices'][0]['children']:
#size = os.statvfs(dev + part['name'][len(drive_name):])
parts[part['name'][len(drive_name):]] = {
#'size' : size.f_frsize * size.f_bavail,
@@ -537,7 +537,7 @@ if __name__ == '__main__':
if len(args['paritions']) <= 0:
print('[E] No paritions were created on {drive}'.format(**args), o)
exit(1)
- for index, part_name in enumerate(args['paritions']): # TODO: sorted() here instead? Just to be safe? o0
+ for index, part_name in enumerate(sorted(args['paritions'].keys())):
args['partition_{}'.format(index+1)] = part_name
o = b''.join(sys_command('/usr/bin/mkfs.vfat -F32 {drive}{partition_1}'.format(**args)).exec())