From 0a7262148ebc49798b3571b23a5fd11092028686 Mon Sep 17 00:00:00 2001 From: dalto Date: Mon, 15 Nov 2021 19:03:20 -0600 Subject: [PATCH] [umount] Convert zfs export call to use host_env_process_output --- src/modules/umount/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/umount/main.py b/src/modules/umount/main.py index 795eb8d2b..77ea91e34 100644 --- a/src/modules/umount/main.py +++ b/src/modules/umount/main.py @@ -60,8 +60,9 @@ def export_zpools(root_mount_point): zfs_pool_list.sort(reverse=True, key=lambda x: x["poolName"]) if zfs_pool_list: for zfs_pool in zfs_pool_list: - import_result = subprocess.run(['zpool', 'export', root_mount_point, zfs_pool["poolName"]]) - if import_result.returncode != 0: + try: + libcalamares.utils.host_env_process_output(['zpool', 'export', zfs_pool["poolName"]]) + except subprocess.CalledProcessError: libcalamares.utils.warning("Failed to export zpool") except Exception as e: # If this fails it shouldn't cause the installation to fail