Skip to content

Commit 75cb6ca

Browse files
committed
fix: Allow creating partition table on empty disks in safe mode
1 parent 1be2173 commit 75cb6ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/blivet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ def _look_up_device(self):
17141714
def _create(self):
17151715
if self._device.format.type != "disklabel" or \
17161716
(disklabel_type and self._device.format.label_type != disklabel_type):
1717-
if safe_mode:
1717+
if safe_mode and self._device.format.name != get_format(None).name:
17181718
raise BlivetAnsibleError("cannot remove existing formatting and/or devices on disk '%s' "
17191719
"(pool '%s') in safe mode" % (self._device.name, self._pool['name']))
17201720
else:

0 commit comments

Comments
 (0)