diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-07-22 04:47:45 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-07-22 04:47:45 +0000 |
commit | cc811d1e7dd69db98504c4afc49738e2ad0957ac (patch) | |
tree | 2589284b3e89ede860268d91321b30e76826c06b /partitioning.py | |
parent | 95381446ab1f04388bcf78713fe627270934a187 (diff) | |
download | anaconda-cc811d1e7dd69db98504c4afc49738e2ad0957ac.tar.gz anaconda-cc811d1e7dd69db98504c4afc49738e2ad0957ac.tar.xz anaconda-cc811d1e7dd69db98504c4afc49738e2ad0957ac.zip |
give warnings and errors for partitions using sanity checking function
previously committed and being used for kickstart. errors are fatal
and must be corrected. warnings give you a choice as to whether you
wish to continue without making changes
Diffstat (limited to 'partitioning.py')
-rw-r--r-- | partitioning.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/partitioning.py b/partitioning.py index 99b89119f..100ea6c03 100644 --- a/partitioning.py +++ b/partitioning.py @@ -25,6 +25,7 @@ import raid import fsset import os import sys +import string import iutil from translate import _ from log import log @@ -1453,6 +1454,32 @@ def queryNoFormatPreExisting(intf): type = "yesno", default = "no") return rc +def partitionSanityErrors(intf, errors): + rc = 1 + if errors: + errorstr = string.join(errors, "\n\n") + rc = intf.messageWindow(_("Error with Partitioning"), + _("The following critical errors exist " + "with your requested partitioning " + "scheme. " + "These errors must be corrected prior " + "to continuing with your install of " + "Red Hat Linux.\n\n%s") %(errorstr)) + return rc + + +def partitionSanityWarnings(intf, warnings): + rc = 1 + if warnings: + warningstr = string.join(warnings, "\n\n") + rc = intf.messageWindow(_("Partitioning Warning"), + _("The following warnings exist with " + "your requested partition scheme.\n\n%s" + "\n\nWould you like to continue with " + "your requested partitioning " + "scheme.") % (warningstr), + type="yesno") + return rc # XXX is this all of the possibilities? dosPartitionTypes = [ 1, 6, 11, 12, 14, 15 ] |