[PATCH storage] We are searching a list, not a dict now

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Related commit: 4503335c6f5d33bcb236da1757123dde73a842bc.
---
 kickstart.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index fb20792..585b8e6 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -603,9 +603,9 @@ class Partition(commands.partition.F9_Partition):
         if pd.start != 0 and pd.disk == "":
             raise KickstartValueError, formatErrorMsg(self.lineno, msg="Partition command with start cylinder requires a drive specification")
         hds = map(lambda x: x.name, filter(lambda x: isys.mediaPresent(x.name), self.handler.id.storage.disks))
-        if not hds.has_key(pd.disk) and hds.has_key('mapper/'+pd.disk):
+        if pd.disk not in hds and pd.disk in ('mapper/'+hd for hd in hds):
             pd.disk = 'mapper/' + pd.disk
-        if pd.disk != "" and pd.disk not in hds.keys():
+        if pd.disk not in hds:
             raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent disk %s in partition command" % pd.disk)
 
         request = partRequests.PartitionSpec(filesystem,
-- 
1.5.4.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux