summaryrefslogtreecommitdiffstats
path: root/partIntfHelpers.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-10-06 21:58:56 +0000
committerJeremy Katz <katzj@redhat.com>2004-10-06 21:58:56 +0000
commitdf16e4725ba21977f56ddfb06879ab80832b332e (patch)
tree285c3f451f28cff9675797044d887298fee39ba1 /partIntfHelpers.py
parent49c119102eb12c689a4ad1e4b34f72abedd76a10 (diff)
downloadanaconda-df16e4725ba21977f56ddfb06879ab80832b332e.tar.gz
anaconda-df16e4725ba21977f56ddfb06879ab80832b332e.tar.xz
anaconda-df16e4725ba21977f56ddfb06879ab80832b332e.zip
2004-10-06 Jeremy Katz <katzj@redhat.com>
* 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)
Diffstat (limited to 'partIntfHelpers.py')
-rw-r--r--partIntfHelpers.py5
1 files changed, 3 insertions, 2 deletions
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