From 252dfb295b271cd3f7cbc0cf99bf190f3a620225 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 18 Nov 2019 16:42:02 +0100 Subject: Fix for unpartitioned drives. --- archinstall.py | 11 ++++++----- 1 file 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) -- cgit v1.2.3-70-g09d2