Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] localization: properly decode formatted number for localized_size().
Date: Wed, 06 Aug 2014 16:32:44
Message-Id: 1407342788-22562-1-git-send-email-mgorny@gentoo.org
1 Fixes: https://bugs.gentoo.org/show_bug.cgi?id=519124
2 ---
3 pym/portage/localization.py | 3 ++-
4 1 file changed, 2 insertions(+), 1 deletion(-)
5
6 diff --git a/pym/portage/localization.py b/pym/portage/localization.py
7 index e4d87b6..cd21567 100644
8 --- a/pym/portage/localization.py
9 +++ b/pym/portage/localization.py
10 @@ -36,4 +36,5 @@ def localized_size(num_bytes):
11
12 # always round up, so that small files don't end up as '0 KiB'
13 num_kib = math.ceil(num_bytes / 1024)
14 - return locale.format('%d', num_kib, grouping=True) + ' KiB'
15 + return (_unicode_decode(locale.format('%d', num_kib, grouping=True))
16 + + ' KiB')
17 --
18 2.0.4

Replies