From d477f8d076789cbe1c0a85545ea8b5133fdc4bdf Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Fri, 18 Sep 2020 13:58:48 +0200 Subject: [PATCH] Let parted fix fixable issues with partition table This will automatically fix issues like GPT partition table not covering whole device after disk size change. Resolves: rhbz#1846869 --- blivet/populator/populator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blivet/populator/populator.py b/blivet/populator/populator.py index 465c272d..fe566816 100644 --- a/blivet/populator/populator.py +++ b/blivet/populator/populator.py @@ -64,6 +64,9 @@ def parted_exn_handler(exn_type, exn_options, exn_msg): if exn_type == parted.EXCEPTION_TYPE_ERROR and \ exn_options == parted.EXCEPTION_OPT_YES_NO: ret = parted.EXCEPTION_RESOLVE_YES + elif exn_type == parted.EXCEPTION_TYPE_WARNING and \ + exn_options & parted.EXCEPTION_RESOLVE_FIX: + ret = parted.EXCEPTION_RESOLVE_FIX return ret -- 2.29.2