[bootloader] Convert command-failures into readable error messages
Avoid leaking errors to the caller, because that gets us a traceback and generic Python Error message, which is less-than-helpful.
This commit is contained in:
parent
e186e54434
commit
bb1df38caa
@ -474,6 +474,14 @@ def run():
|
|||||||
libcalamares.utils.warning( "EFI system, but nothing mounted on {!s}".format(efi_system_partition) )
|
libcalamares.utils.warning( "EFI system, but nothing mounted on {!s}".format(efi_system_partition) )
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
try:
|
||||||
prepare_bootloader(fw_type)
|
prepare_bootloader(fw_type)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
libcalamares.utils.warning(str(e))
|
||||||
|
libcalamares.utils.debug("stdout:" + str(e.stdout))
|
||||||
|
libcalamares.utils.debug("stderr:" + str(e.stderr))
|
||||||
|
return (_("Bootloader installation error"),
|
||||||
|
_("The bootloader could not be installed. The installation command <pre>{!s}</pre> returned error code {!s}.")
|
||||||
|
.format(e.cmd, e.returncode))
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user