[blivet:master 1/7] Rearranged some iffy exception checking
mulhern
amulhern at redhat.com
Thu Mar 27 14:38:57 UTC 2014
From: David Shea <dshea at redhat.com>
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devicefactory.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index e2e0434..f20b095 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -613,17 +613,14 @@ class DeviceFactory(object):
# current size of the container
self._set_device_size()
- e = None
try:
self._post_create()
except StorageError as e:
log.error("device post-create method failed: %s", e)
+ raise
else:
if self.device.size <= self.device.format.minSize:
- e = StorageError("failed to adjust device -- not enough free space in specified disks?")
-
- if e:
- raise(e)
+ raise StorageError("failed to adjust device -- not enough free space in specified disks?")
def _set_format(self):
current_format = self.device.format
--
1.8.3.1
More information about the anaconda-patches
mailing list