From df16e4725ba21977f56ddfb06879ab80832b332e Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 6 Oct 2004 21:58:56 +0000 Subject: 2004-10-06 Jeremy Katz * partRequests.py (RequestSpec.sanityCheckRequest): Call sanityCheckMountPoint with new option * partIntfHelpers.py (sanityCheckMountPoint): Don't allow formatting unless they specify a mountpoint on pre-existing partitions (#134865) --- ChangeLog | 7 +++++++ partIntfHelpers.py | 5 +++-- partRequests.py | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c05ae3310..b4de3f30d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2004-10-06 Jeremy Katz + * partRequests.py (RequestSpec.sanityCheckRequest): Call + sanityCheckMountPoint with new option + + * partIntfHelpers.py (sanityCheckMountPoint): Don't allow + formatting unless they specify a mountpoint on pre-existing + partitions (#134865) + * iw/network_gui.py (NetworkWindow.getScreen): Make Bengali fit a little bit better (#134762) diff --git a/partIntfHelpers.py b/partIntfHelpers.py index 391d4a1e5..e4e94e84e 100644 --- a/partIntfHelpers.py +++ b/partIntfHelpers.py @@ -73,12 +73,13 @@ def sanityCheckLogicalVolumeName(logvolname): "are letters, digits, '.' or '_'.") return None -def sanityCheckMountPoint(mntpt, fstype, preexisting): +def sanityCheckMountPoint(mntpt, fstype, preexisting, format): """Sanity check that the mountpoint is valid. mntpt is the mountpoint being used. fstype is the file system being used on the request. preexisting is whether the request was preexisting (request.preexist) + format is whether the request is being formatted or not """ if mntpt: passed = 1 @@ -97,7 +98,7 @@ def sanityCheckMountPoint(mntpt, fstype, preexisting): else: return None else: - if (fstype and fstype.isMountable() and not preexisting): + if (fstype and fstype.isMountable() and (not preexisting or format)): return _("Please specify a mount point for this partition.") else: # its an existing partition so don't force a mount point diff --git a/partRequests.py b/partRequests.py index 54b5a574c..78e64e2b1 100644 --- a/partRequests.py +++ b/partRequests.py @@ -290,12 +290,13 @@ class RequestSpec: mntpt = self.mountpoint fstype = self.fstype preexist = self.preexist + format = self.format rc = self.doSizeSanityCheck() if rc: return rc - rc = partIntfHelpers.sanityCheckMountPoint(mntpt, fstype, preexist) + rc = partIntfHelpers.sanityCheckMountPoint(mntpt, fstype, preexist, format) if rc: return rc -- cgit