mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
[mount] Bail on bad config
- One might argue whether an empty list of partitions to mount is a bad thing. It suggests that the partition module wasn't used, and so we're in an OEM situation -- but then everything should already be mounted anyway. That's why I choose empty -> bail.
This commit is contained in:
parent
ec0fe2ccd3
commit
7d0874e23b
1 changed files with 7 additions and 1 deletions
|
@ -133,9 +133,15 @@ def run():
|
|||
|
||||
:return:
|
||||
"""
|
||||
root_mount_point = tempfile.mkdtemp(prefix="calamares-root-")
|
||||
partitions = libcalamares.globalstorage.value("partitions")
|
||||
|
||||
if not partitions:
|
||||
libcalamares.utils.warning("partitions is empty, {!s}".format(partitions))
|
||||
return (_("Configuration Error"),
|
||||
_("No partitions are defined for <pre>{!s}</pre> to use." ).format("mount"))
|
||||
|
||||
root_mount_point = tempfile.mkdtemp(prefix="calamares-root-")
|
||||
|
||||
# Guard against missing keys (generally a sign that the config file is bad)
|
||||
extra_mounts = libcalamares.job.configuration.get("extraMounts") or []
|
||||
extra_mounts_efi = libcalamares.job.configuration.get("extraMountsEfi") or []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue