Skip to content

Commit

Permalink
Special case for format destroy on unformatted device.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwlehman committed Oct 3, 2019
1 parent 7c9e6ee commit 8fac471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/blivet.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _reformat(self):
if self._device.format.type == fmt.type:
return

if safe_mode:
if safe_mode and self._device.format.type is None and self._device.format.name != get_format(None).name:
raise BlivetAnsibleError("cannot remove existing formatting on volume '%s' in safe mode" % self._volume['name'])

if self._device.format.status:
Expand Down

0 comments on commit 8fac471

Please sign in to comment.