From e196fdfb62a5c5a8d56727f703e8a35abe3956ea Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 20 Jul 2022 10:00:53 +0000 Subject: [PATCH] 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 --- ironic_python_agent/hardware.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py index dfcce6f80..b3f035dc2 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)