From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5B559139694 for ; Wed, 19 Jul 2017 20:54:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A4287E0F0A; Wed, 19 Jul 2017 20:54:32 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 80AC6E0F0A for ; Wed, 19 Jul 2017 20:54:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3EF8C341799 for ; Wed, 19 Jul 2017 20:54:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8CB64291E for ; Wed, 19 Jul 2017 20:54:29 +0000 (UTC) From: "Manuel Rüger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Manuel Rüger" Message-ID: <1500497553.becb67d7bf5e653d5646e974f2976b0ef5d63570.mrueg@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/localization.py X-VCS-Directories: pym/portage/ X-VCS-Committer: mrueg X-VCS-Committer-Name: Manuel Rüger X-VCS-Revision: becb67d7bf5e653d5646e974f2976b0ef5d63570 X-VCS-Branch: master Date: Wed, 19 Jul 2017 20:54:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 27b60d49-71c0-4778-81f1-95c7bfde6ebd X-Archives-Hash: 7c8623f8601577b8bd841432325a6570 commit: becb67d7bf5e653d5646e974f2976b0ef5d63570 Author: Manuel Rüger gentoo org> AuthorDate: Tue Jul 4 22:56:59 2017 +0000 Commit: Manuel Rüger gentoo org> CommitDate: Wed Jul 19 20:52:33 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=becb67d7 localization: Replace deprecated locale.format() with format_string() pym/portage/localization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/localization.py b/pym/portage/localization.py index 90202fb58..b215b9cba 100644 --- a/pym/portage/localization.py +++ b/pym/portage/localization.py @@ -39,7 +39,7 @@ def localized_size(num_bytes): # always round up, so that small files don't end up as '0 KiB' num_kib = math.ceil(num_bytes / 1024) try: - formatted_num = locale.format('%d', num_kib, grouping=True) + formatted_num = locale.format_string('%d', num_kib, grouping=True) except UnicodeDecodeError: # failure to decode locale data formatted_num = str(num_kib)