From 8c552b233643b8c7773b9046926916888c8a16e8 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..82a4370f 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().name: raise BlivetAnsibleError("cannot remove existing formatting on volume '%s' in safe mode" % self._volume['name']) if self._device.format.status: