[rhel6-branch] Show ks lvm DeviceErrors in the UI (#880625)
Brian C. Lane
bcl at redhat.com
Wed Jun 26 23:35:47 UTC 2013
From: "Brian C. Lane" <bcl at redhat.com>
---
kickstart.py | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/kickstart.py b/kickstart.py
index c227822..6231d38 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -560,13 +560,17 @@ class LogVolData(commands.logvol.RHEL6_LogVolData):
except KeyError:
pass
- request = storage.newLV(format=format,
- name=self.name,
- vg=vg,
- size=self.size,
- grow=self.grow,
- maxsize=self.maxSizeMB,
- percent=self.percent)
+ try:
+ request = storage.newLV(format=format,
+ name=self.name,
+ vg=vg,
+ size=self.size,
+ grow=self.grow,
+ maxsize=self.maxSizeMB,
+ percent=self.percent)
+ except DeviceError as e:
+ # Promote DeviceError to KickstartError so the UI will display it
+ raise KickstartError(str(e))
if self.fsprofile and hasattr(request.format, "fsprofile"):
request.format.fsprofile = self.fsprofile
--
1.8.1.4
More information about the anaconda-patches
mailing list