diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-07-11 02:24:58 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-07-11 02:24:58 +0000 |
commit | 228fcffd5271cd55dff90cbd77eb92b623cb6c39 (patch) | |
tree | fddb3df87dcb1ec21cd374436e465aebd3baed8a | |
parent | a7bab3f6865cc2ffcfe36c855145976bbbb6200a (diff) | |
download | anaconda-228fcffd5271cd55dff90cbd77eb92b623cb6c39.tar.gz anaconda-228fcffd5271cd55dff90cbd77eb92b623cb6c39.tar.xz anaconda-228fcffd5271cd55dff90cbd77eb92b623cb6c39.zip |
if we don't have any valid drives to install on, show an error message
and then exit the install
-rw-r--r-- | dispatch.py | 2 | ||||
-rw-r--r-- | partitioning.py | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/dispatch.py b/dispatch.py index 20f35450e..1203edf2e 100644 --- a/dispatch.py +++ b/dispatch.py @@ -52,7 +52,7 @@ installSteps = [ ( "installtype", ("dispatch", "id", "method", "intf") ), ( "findinstall", ("dispatch", "intf", "id", "instPath") ), ( "partitionmethod", ("id.partitions", "id.instClass") ), - ( "partitionobjinit", partitionObjectsInitialize, ("id.diskset", "id.partitions", "dir") ), + ( "partitionobjinit", partitionObjectsInitialize, ("id.diskset", "id.partitions", "dir", "intf") ), ( "partitionmethodsetup", partitionMethodSetup, ("id.partitions", "dispatch") ), ( "autopartition", ("id.diskset", "id.partitions", "intf", "dispatch") ), ( "autopartitionexecute", doAutoPartition, ("dir", "id.diskset", "id.partitions", "intf")), diff --git a/partitioning.py b/partitioning.py index 49b1bc50c..3e2e103f3 100644 --- a/partitioning.py +++ b/partitioning.py @@ -24,6 +24,7 @@ import math import raid import fsset import os +import sys import iutil from translate import _ from log import log @@ -1022,13 +1023,23 @@ class DiskSet: part = disk.next_partition(part) return rc -def partitionObjectsInitialize(diskset, partitions, dir): +def partitionObjectsInitialize(diskset, partitions, dir, intf): if dir == DISPATCH_BACK: diskset.closeDevices() return # read in drive info diskset.refreshDevices() + + if len(diskset.disks.keys()) == 0: + intf.messageWindow(_("No Drives Found"), + _("An error has occurred - no valid devices were " + "found on which to create new filesystems. " + "Please check your hardware for the cause " + "of this problem.")) + sys.exit(0) + + partitions.setFromDisk(diskset) def partitionMethodSetup(partitions, dispatch): |