[PATCH 2/3] Fix handling of failure to create a new container. (#892046)

David Lehman dlehman at redhat.com
Mon Jan 7 21:48:19 UTC 2013


If there's not enough disk space to make a new container, newDevice
must raise a StorageError to tell the ui to try to find a suitable
preexisting container.
---
 pyanaconda/storage/__init__.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 6999918..5aeb45a 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -2202,6 +2202,9 @@ class Storage(object):
 
         # set up container
         if not container and factory.new_container_attr:
+            if not parents:
+                raise StorageError("not enough free space on disks")
+
             log.debug("creating new container")
             if container_name:
                 kwa = {"name": container_name}
-- 
1.7.7.6



More information about the anaconda-patches mailing list