Related: rhbz#1060255
Moves the sanityCheck call into a separate method. The separate method doesn't do much but allows to throw a PartitioningError in some cases where that is expected.
Signed-off-by: mulhern amulhern@redhat.com --- blivet/partitioning.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/blivet/partitioning.py b/blivet/partitioning.py index abaf1b3..263ad2f 100644 --- a/blivet/partitioning.py +++ b/blivet/partitioning.py @@ -285,6 +285,8 @@ def _scheduleVolumes(storage, devs): storage.createDevice(dev)
def doAutoPartition(storage, data): + """Calculates a partition scheme. + """ log.debug("doAutoPart: %s" % storage.doAutoPart) log.debug("encryptedAutoPart: %s" % storage.encryptedAutoPart) log.debug("autoPartType: %s" % storage.autoPartType) @@ -325,7 +327,11 @@ def doAutoPartition(storage, data):
storage.setUpBootLoader()
- # now do a full check of the requests +def sanityCheck(storage): + """Do a sanity check in a partitioning context. + + Raises a partitioning error on fatal errors. + """ (errors, warnings) = storage.sanityCheck() for error in errors: log.error(error)