[master/rhel7-branch] Re-apply disk selection on error in TUi storage. (#1056316)
Brian C. Lane
bcl at redhat.com
Wed Feb 19 19:27:12 UTC 2014
On Wed, Feb 19, 2014 at 10:48:18AM -0500, Samantha N. Bueno wrote:
> diff --git a/pyanaconda/ui/lib/disks.py b/pyanaconda/ui/lib/disks.py
> index 486208b..ddfc6ea 100644
> --- a/pyanaconda/ui/lib/disks.py
> +++ b/pyanaconda/ui/lib/disks.py
> @@ -82,3 +82,12 @@ def size_str(mb):
> spec = "%f mb" % mb
>
> return str(Size(spec=spec)).upper()
> +
> +def applyDiskSelection(use_names):
> + onlyuse = use_names[:]
> + for disk in (d for d in self.storage.disks if d.name in onlyuse):
> + onlyuse.extend(d.name for d in disk.ancestors
> + if d.name not in onlyuse)
> +
> + self.data.ignoredisk.onlyuse = onlyuse
> + self.data.clearpart.drives = use_names[:]
It's going to need storage and data objects passed into it.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list