[PATCH 07/12] Raise an exception early in newDevice if no disks were specified. (#858139)
David Lehman
dlehman at redhat.com
Thu Oct 4 22:10:11 UTC 2012
---
pyanaconda/storage/__init__.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 0a7a8e5..7107cc6 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -2021,6 +2021,10 @@ class Storage(object):
fmt_args["label"] = label
factory = self.getDeviceFactory(device_type, size, **kwargs)
+
+ if not factory.disks:
+ raise StorageError("no disks specified for new device")
+
self.size_sets = [] # clear this since there are no growable reqs now
container = self.getContainer(factory, device=device)
--
1.7.7.6
More information about the anaconda-patches
mailing list