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
This commit is contained in:
Jakub Jelinek 2022-07-20 10:00:53 +00:00
parent 21b21a5f15
commit e196fdfb62
1 changed files with 0 additions and 5 deletions

View File

@ -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)