[PATCH] Do a thorough search for the Raid Sets.

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

 



Previously, we were returning the set as soon as we found it, ignoring
other sets that might be present.  This patch corrects this behavior.
---
 __init__.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/__init__.py b/__init__.py
index 79ab684..c6449a6 100644
--- a/__init__.py
+++ b/__init__.py
@@ -362,15 +362,16 @@ def getRaidSetFromRelatedMem(uuid=None, major=None, minor=None, name=None):
     uuid and name are strings.  major and minor are converted to long before
     being compared.  name is the dev name without the path.
 
-    Returns a string.
-    Returns None if no set is related to the specified device.
+    Returns a list of sets.
+    Returns an empty list if no set is related to the specified device.
     """
+    retval = []
     kwargs = {"uuid":uuid, "name":name, "major":major, "minor":minor}
     for rs in getRaidSets():
         if  getMemFromRaidSet(rs, **kwargs) != None:
-            return rs
+            retval.append(rs)
 
-    return None
+    return retval
 
 __all__ = [ "dm", "dmraid", "BlockDev" ]
 
-- 
1.6.0.6

_______________________________________________
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