[PATCH] display storage errors in text mode storage spoke

Jesse Keating jkeating at redhat.com
Fri Oct 26 18:22:29 UTC 2012


On 10/26/2012 10:51 AM, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at redhat.com>
>
> ---
>   pyanaconda/ui/tui/spokes/storage.py | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
> index c0a7cdd..a8b3d9f 100644
> --- a/pyanaconda/ui/tui/spokes/storage.py
> +++ b/pyanaconda/ui/tui/spokes/storage.py
> @@ -168,6 +168,10 @@ class StorageSpoke(NormalTUISpoke):
>           elif count == 0:
>               summary = (_("No disks selected; please select at least one disk to install to."))
>
> +        # Append storage errors to the summary
> +        if self.errors:
> +            summary = summary + "\n" + "\n".join(self.errors)
> +
>           return summary
>
>       def refresh(self, args = None):
> @@ -261,7 +265,8 @@ class StorageSpoke(NormalTUISpoke):
>               doKickstartStorage(self.storage, self.data, self.instclass)
>           except StorageError as e:
>               log.error("storage configuration failed: %s" % e)
> -            self.errors = e
> +            print _("storage configuration failed: %s") % e
> +            self.errors = [str(e)]
>               self.data.clearpart.type = CLEARPART_TYPE_ALL
>               self.data.clearpart.initAll = False
>               self.storage.config.update(self.data)
> @@ -274,8 +279,10 @@ class StorageSpoke(NormalTUISpoke):
>               self._ready = True
>               for e in self.errors:
>                   log.error(e)
> +                print e
>               for w in warnings:
>                   log.warn(w)
> +                print w
>
>       def initialize(self):
>           NormalTUISpoke.initialize(self)
>

ACK

-- 
Jesse Keating
Fedora -- FreedomĀ² is a feature!


More information about the anaconda-patches mailing list