[blivet:master 2/8] Remove unused 'slaves' variable.

mulhern amulhern at redhat.com
Wed Jun 18 19:05:09 UTC 2014


It is initialized and modified, but never actually used.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devicetree.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 62e70e2..b4e5b00 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -866,7 +866,6 @@ class DeviceTree(object):
         log_method_call(self, name=name)
         sysfs_path = udev.udev_device_get_sysfs_path(info)
 
-        slaves = []
         slave_dir = os.path.normpath("/sys/%s/slaves" % sysfs_path)
         slave_names = os.listdir(slave_dir)
         for slave_name in slave_names:
@@ -876,9 +875,7 @@ class DeviceTree(object):
             else:
                 dev_name = slave_name
             slave_dev = self.getDeviceByName(dev_name)
-            if slave_dev:
-                slaves.append(slave_dev)
-            else:
+            if not slave_dev:
                 # we haven't scanned the slave yet, so do it now
                 path = os.path.normpath("%s/%s" % (slave_dir, slave_name))
                 new_info = udev.udev_get_block_device(os.path.realpath(path)[4:])
-- 
1.9.3



More information about the anaconda-patches mailing list