Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-18 16:42:02 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-18 16:42:02 +0100
commit252dfb295b271cd3f7cbc0cf99bf190f3a620225 (patch)
tree2cb6b4a045cf00a9724f4504ce86937ba3faf1e7
parent9cd0a4b73f4d284e1991360f316a1053a234f232 (diff)
Fix for unpartitioned drives.
-rw-r--r--archinstall.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/archinstall.py b/archinstall.py
index e43109b4..26c82a7e 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -500,11 +500,12 @@ def disk_info(drive, *positionals, **kwargs):
info = json.loads(b''.join(sys_command(f'lsblk -J -o "NAME,SIZE,FSTYPE,LABEL" {drive}', *positionals, **lkwargs)).decode('UTF_8'))['blockdevices'][0]
fileformats = []
labels = []
- for child in info['children']:
- if child['fstype'] != None:
- fileformats.append(child['fstype'])
- if child['label'] != None:
- labels.append(child['label'])
+ if 'children' in info: ## Might not be partitioned yet
+ for child in info['children']:
+ if child['fstype'] != None:
+ fileformats.append(child['fstype'])
+ if child['label'] != None:
+ labels.append(child['label'])
info['fileformats'] = fileformats
info['labels'] = labels
info['model'] = get_disk_model(drive)