[blivet] Add another .decode("utf-8") to humanReadable (#1059807)

Vratislav Podzimek vpodzime at redhat.com
Wed Feb 5 08:33:05 UTC 2014


On Wed, 2014-02-05 at 09:28 +0100, David Shea wrote:
> This way Size.humanReadable always returns a unicode object that __str__
> can always convert back to a str.
> ---
>  blivet/size.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/blivet/size.py b/blivet/size.py
> index 65668c5..03bfa38 100644
> --- a/blivet/size.py
> +++ b/blivet/size.py
> @@ -279,7 +279,7 @@ class Size(Decimal):
>          check = self._trimEnd("%d" % self)
>  
>          if abs(Decimal(check)) < 1000:
> -            return "%s %s" % (check, _("B"))
> +            return "%s %s" % (check, _("B").decode("utf-8"))
>  
>          for factor, prefix, abbr in _xlated_prefixes():
>              newcheck = super(Size, self).__div__(Decimal(factor))
ACK. Another line to this neverending story. 

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list