[blivet:rhel7/master 2/4] Separate sanityCheck-ing from doAutoPartition (#1060255)
mulhern
amulhern at redhat.com
Fri Feb 7 15:01:12 UTC 2014
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 at 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)
--
1.8.3.1
More information about the anaconda-patches
mailing list