[umount] Convert zfs export call to use host_env_process_output

This commit is contained in:
dalto 2021-11-15 19:03:20 -06:00
parent ec8bab4013
commit 0a7262148e

View File

@ -60,8 +60,9 @@ def export_zpools(root_mount_point):
zfs_pool_list.sort(reverse=True, key=lambda x: x["poolName"]) zfs_pool_list.sort(reverse=True, key=lambda x: x["poolName"])
if zfs_pool_list: if zfs_pool_list:
for zfs_pool in zfs_pool_list: for zfs_pool in zfs_pool_list:
import_result = subprocess.run(['zpool', 'export', root_mount_point, zfs_pool["poolName"]]) try:
if import_result.returncode != 0: libcalamares.utils.host_env_process_output(['zpool', 'export', zfs_pool["poolName"]])
except subprocess.CalledProcessError:
libcalamares.utils.warning("Failed to export zpool") libcalamares.utils.warning("Failed to export zpool")
except Exception as e: except Exception as e:
# If this fails it shouldn't cause the installation to fail # If this fails it shouldn't cause the installation to fail