[PATCH] Don't uppercase the size values in the disk shopping cart.

Anne Mulhern amulhern at redhat.com
Fri May 30 16:29:31 UTC 2014





----- Original Message -----
> From: "Chris Lumens" <clumens at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, May 30, 2014 10:57:41 AM
> Subject: [PATCH] Don't uppercase the size values in the disk shopping cart.
> 
> "16 GIB" looks weird.  Also get rid of all the unnecessary conversion between
> Size and long and Size again.
> ---
>  pyanaconda/ui/gui/spokes/lib/cart.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/lib/cart.py
> b/pyanaconda/ui/gui/spokes/lib/cart.py
> index 90b9818..5252025 100644
> --- a/pyanaconda/ui/gui/spokes/lib/cart.py
> +++ b/pyanaconda/ui/gui/spokes/lib/cart.py
> @@ -120,15 +120,15 @@ class SelectedDisksDialog(GUIObject):
>  
>      def _update_summary(self):
>          count = 0
> -        size = 0
> -        free = 0
> +        size = Size(0)
> +        free = Size(0)
>          for row in self._store:
>              count += 1
>              size += Size(row[SIZE_COL])
>              free += Size(row[FREE_SPACE_COL])
>  
> -        size = str(Size(long(size))).upper()
> -        free = str(Size(long(free))).upper()
> +        size = str(size)
> +        free = str(free)
>  

I think you can just delete the two lines above, rather than replace them
since escape_markup will convert them anyway, and they don't get any other use.

>          # pylint: disable=unescaped-markup
>          text = P_("<b>%(count)d disk; %(size)s capacity; %(free)s free
>          space</b> "
> --
> 1.9.0
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

- mulhern


More information about the anaconda-patches mailing list