From: David Lehman dlehman@redhat.com
--- blivet/devicefactory.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py index 1fbfb01..6a924ae 100644 --- a/blivet/devicefactory.py +++ b/blivet/devicefactory.py @@ -642,18 +642,19 @@ def _create_device(self): raise
self.storage.create_device(device) - e = None + err = None try: self._post_create() except (StorageError, blockdev.BlockDevError) as e: log.error("device post-create method failed: %s", e) + err = str(e) else: if not device.size: - e = StorageError("failed to create device") + err = "failed to create device"
- if e: + if err: self.storage.destroy_device(device) - raise StorageError(e) + raise StorageError(err)
ret = device if self.encrypted:
anaconda-patches@lists.fedorahosted.org