From c296f67356678c8182f5cd6c43364b372c9fc86c Mon Sep 17 00:00:00 2001 From: Masato TOYOSHIMA <77603626+phoepsilonix@users.noreply.github.com> Date: Sun, 26 Feb 2023 07:48:51 +0900 Subject: [PATCH] Update main.py --- src/modules/mount/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py index 40ab731ed..2847f4909 100644 --- a/src/modules/mount/main.py +++ b/src/modules/mount/main.py @@ -310,7 +310,7 @@ def mount_partition(root_mount_point, partition, partitions, mount_options, moun def enable_swap_partition(swap_device): try: for d in swap_device: - subprocess.check_call(["swapon", d]) + libcalamares.utils.host_env_process_output(["swapon", d]) except subprocess.CalledProcessError: raise Exception(_("Failed to swapon " + swap_device)) @@ -327,7 +327,7 @@ def run(): return (_("Configuration Error"), _("No partitions are defined for
{!s}to use.").format("mount")) - swap_partitions = [p['device'] for p in partitions if ( p['fs'] == 'linuxswap' and p['claimed'] == True ) ] + swap_partitions = [p['device'] for p in partitions if ( p['fs'] == 'linuxswap' and p['claimed'] ) ] if swap_partitions != [] : enable_swap_partition(swap_partitions)