mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[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
1 changed files with 9 additions and 1 deletions
|
@ -474,6 +474,14 @@ def run():
|
|||
libcalamares.utils.warning( "EFI system, but nothing mounted on {!s}".format(efi_system_partition) )
|
||||
return None
|
||||
|
||||
prepare_bootloader(fw_type)
|
||||
try:
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue