--- storage/devicetree.py | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/storage/devicetree.py b/storage/devicetree.py index 9c3722b..90a078e 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -1309,27 +1309,27 @@ class DeviceTree(object): self.addIgnoredDisk(device.raidSet.name) self.addIgnoredDisk(device.name) return - else: - if not format.exists: - # if we just initialized a disklabel we should schedule - # actions for destruction of the previous format and creation - # of the new one - self.registerAction(ActionDestroyFormat(device)) - self.registerAction(ActionCreateFormat(device, format)) - - # If this is a mac-formatted disk we just initialized, make - # sure the partition table partition gets added to the device - # tree. - if device.format.partedDisk.type == "mac" and \ - len(device.format.partitions) == 1: - name = device.format.partitions[0].getDeviceNodeName() - if not self.getDeviceByName(name): - partDevice = PartitionDevice(name, exists=True, - parents=[device]) - self._addDevice(partDevice) - else: - device.format = format + if not format.exists: + # if we just initialized a disklabel we should schedule + # actions for destruction of the previous format and creation + # of the new one + self.registerAction(ActionDestroyFormat(device)) + self.registerAction(ActionCreateFormat(device, format)) + + # If this is a mac-formatted disk we just initialized, make + # sure the partition table partition gets added to the device + # tree. + if device.format.partedDisk.type == "mac" and \ + len(device.format.partitions) == 1: + name = device.format.partitions[0].getDeviceNodeName() + if not self.getDeviceByName(name): + partDevice = PartitionDevice(name, exists=True, + parents=[device]) + self._addDevice(partDevice) + + else: + device.format = format def handleUdevLUKSFormat(self, info, device): log_method_call(self, name=device.name, type=device.format.type) -- 1.6.0.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list