diff options
author | Jakub Jelinek <jakub.jelinek@cern.ch> | 2022-07-20 10:00:53 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub.jelinek@cern.ch> | 2022-07-20 10:00:53 +0000 |
commit | e196fdfb62a5c5a8d56727f703e8a35abe3956ea (patch) | |
tree | a2f4048d7bca4785bffa0a338a38f0bd7a157391 | |
parent | 21b21a5f15bce4871f6af0dc06ebf50d0e9b0967 (diff) | |
download | ironic-python-agent-e196fdfb62a5c5a8d56727f703e8a35abe3956ea.tar.gz |
Remove unused lines of code
The 5 lines of code were extracted from erase_devices_metadata to _list_erasable_devices, but now are duplicated in both functions.
The variable block_devices is not used in erase_devices_metadata.
Change-Id: I89f56c69d90fb0eb61907d6667266fbd57d333af
-rw-r--r-- | ironic_python_agent/hardware.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py index dfcce6f8..b3f035dc 100644 --- a/ironic_python_agent/hardware.py +++ b/ironic_python_agent/hardware.py @@ -1551,11 +1551,6 @@ class GenericHardwareManager(HardwareManager): operational risk which exists as it could also be a sign of an environmental misconfiguration. """ - block_devices = self.list_block_devices(include_partitions=True) - # NOTE(coreywright): Reverse sort by device name so a partition (eg - # sda1) is processed before it disappears when its associated disk (eg - # sda) has its partition table erased and the kernel notified. - block_devices.sort(key=lambda dev: dev.name, reverse=True) erase_errors = {} for dev in self._list_erasable_devices(): safety_check_block_device(node, dev.name) |