From 8fac471c84009be19e502297322bc25fed7e9408 Mon Sep 17 00:00:00 2001 From: David Lehman Date: Thu, 3 Oct 2019 14:08:12 -0400 Subject: [PATCH] Special case for format destroy on unformatted device. --- library/blivet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/blivet.py b/library/blivet.py index a47e6329..d474bbf5 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: + 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: