summaryrefslogtreecommitdiffstats
path: root/autopart.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-08-02 18:06:21 +0000
committerChris Lumens <clumens@redhat.com>2007-08-02 18:06:21 +0000
commit09b0588d4cc9c39ae177a689966e0cc7824262dc (patch)
tree52e81cb0e7f39e9ceb5733a33896a8face1dbc6f /autopart.py
parentc4932caacabe8f899d917fc8bb1c47b3142b8f9d (diff)
downloadanaconda-09b0588d4cc9c39ae177a689966e0cc7824262dc.tar.gz
anaconda-09b0588d4cc9c39ae177a689966e0cc7824262dc.tar.xz
anaconda-09b0588d4cc9c39ae177a689966e0cc7824262dc.zip
Don't take into consideration drives that have been removed from the diskset
(#250148).
Diffstat (limited to 'autopart.py')
-rw-r--r--autopart.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/autopart.py b/autopart.py
index 3edc2befb..45fbc4701 100644
--- a/autopart.py
+++ b/autopart.py
@@ -3,7 +3,7 @@
#
# Jeremy Katz <katzj@redhat.com>
#
-# Copyright 2001-2005 Red Hat, Inc.
+# Copyright 2001-2007 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -1230,8 +1230,10 @@ def doAutoPartition(anaconda):
# XXX clearpartdrives is overloaded as drives we want to use for linux
drives = []
initial_free = findFreespace(diskset)
+ initial_free_keys = initial_free.keys()
+
if partitions.autoClearPartDrives:
- for drive in partitions.autoClearPartDrives:
+ for drive in filter (lambda d: d in initial_free_keys, partitions.autoClearPartDrives):
free = 0
for f in initial_free[drive]:
size = f.geom.end - f.geom.start