[blivet][master/rhel7-branch][PATCH 3/3] Remove unused method DeviceTree.getDevicesBySerial. (#1155984)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Thu Jun 4 16:04:25 UTC 2015
It used to be used by multipath detection, but we let multipathd do that
now.
Patch originally by Dave Lehman <dlehman at redhat.com>
Resolves: rhbz#1155984
---
blivet/devicetree.py | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 321b431..662a8c2 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -2284,27 +2284,6 @@ class DeviceTree(object):
log_method_return(self, result)
return result
- def getDevicesBySerial(self, serial, incomplete=False, hidden=False):
- """ Return a list of devices with a matching serial.
-
- :param str serial: the serial to match
- :param bool incomplete: include incomplete devices in search
- :param bool hidden: include hidden devices in search
- :returns: all matching devices found
- :rtype: list of :class:`~.devices.Device`
- """
- log_method_call(self, serial=serial, incomplete=incomplete, hidden=hidden)
- devices = self._filterDevices(incomplete=incomplete, hidden=hidden)
- retval = []
- for device in devices:
- if not hasattr(device, "serial"):
- log.warning("device %s has no serial attr", device.name)
- continue
- if device.serial == serial:
- retval.append(device)
- log_method_return(self, [r.name for r in retval])
- return retval
-
def getDeviceByLabel(self, label, incomplete=False, hidden=False):
""" Return a device with a matching filesystem label.
--
1.9.3
More information about the anaconda-patches
mailing list