diff --git a/library/blivet.py b/library/blivet.py index d474bbf5..55d27f08 100644 --- a/library/blivet.py +++ b/library/blivet.py @@ -218,7 +218,7 @@ def _reformat(self): if self._device.format.type == fmt.type: return - if safe_mode and self._device.format.type is None and self._device.format.name != get_format(None).name: + if safe_mode and self._device.format.type is not None or 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: