filesystem: better autoinstall error when no disk
If no disk found was large enough for guided autoinstall, catch that case and report it. Without this, we get a rather unhelpful error: FAIL: 'NoneType' object has no attribute 'grub_device'
This commit is contained in:
parent
3c32cb773c
commit
d9370ae54b
|
@ -435,6 +435,9 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
|||
disk = self.model.disk_for_match(
|
||||
self.model.all_disks(),
|
||||
layout.get("match", {'size': 'largest'}))
|
||||
if not disk:
|
||||
raise Exception("autoinstall cannot configure storage "
|
||||
"- no disk found large enough for install")
|
||||
meth(disk)
|
||||
elif 'config' in self.ai_data:
|
||||
self.model.apply_autoinstall_config(self.ai_data['config'])
|
||||
|
|
Loading…
Reference in New Issue