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))
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.
anaconda-patches@lists.fedorahosted.org