From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4E96113877A for ; Tue, 12 Aug 2014 18:27:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7150BE0D14; Tue, 12 Aug 2014 18:27:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8814E0D14 for ; Tue, 12 Aug 2014 18:27:03 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5057B340424 for ; Tue, 12 Aug 2014 18:27:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 11F1418815 for ; Tue, 12 Aug 2014 18:27:01 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1407867950.269aa06166e36a56219c13258cc53f0fa6e18609.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 269aa06166e36a56219c13258cc53f0fa6e18609 X-VCS-Branch: master Date: Tue, 12 Aug 2014 18:27:01 +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: 1475b1f0-0d22-4083-9fa0-ac919b88f79d X-Archives-Hash: 35101cff4aeecc8d99fc90b6c76ef5e6 commit: 269aa06166e36a56219c13258cc53f0fa6e18609 Author: Michał Górny gentoo org> AuthorDate: Tue Aug 12 18:21:16 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Aug 12 18:25:50 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=269aa061 --sync: Decode getaddrinfo() errors properly Fixes UnicodeDecodeError in Python 2 with getaddrinfo() error messages that contain non-ASCII characters, e.g. in pl_PL.UTF-8 locale. Reviewed-by: Alexander Berntsen gentoo.org> Reviewed-by: Brian Dolbec gentoo.org> --- pym/_emerge/actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index e482744..66e18a4 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2345,7 +2345,8 @@ def _sync_repo(emerge_config, repo): family, socket.SOCK_STREAM)) except socket.error as e: writemsg_level( - "!!! getaddrinfo failed for '%s': %s\n" % (hostname, e), + "!!! getaddrinfo failed for '%s': %s\n" % (hostname, + _unicode_decode(e.strerror, encoding=_encodings['stdio'])), noiselevel=-1, level=logging.ERROR) if addrinfos: From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 619CE13877A for ; Tue, 19 Aug 2014 12:18:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF919E08FF; Tue, 19 Aug 2014 12:17:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 45F3FE09C4 for ; Tue, 19 Aug 2014 12:17:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3DC983402F5 for ; Tue, 19 Aug 2014 12:17:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DE2BB3BC0 for ; Tue, 19 Aug 2014 07:01:05 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1407867950.269aa06166e36a56219c13258cc53f0fa6e18609.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 269aa06166e36a56219c13258cc53f0fa6e18609 X-VCS-Branch: master Date: Tue, 19 Aug 2014 07:01:05 +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: 505b8b90-121e-4de5-96cb-494ba886f106 X-Archives-Hash: b63edf42460db5da525b9e2e7d1b553c Message-ID: <20140819070105.EKhiWP3rysPpM0W9e47C4P-JWtUcOpprcfCcp7WTXsM@z> commit: 269aa06166e36a56219c13258cc53f0fa6e18609 Author: Michał Górny gentoo org> AuthorDate: Tue Aug 12 18:21:16 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Aug 12 18:25:50 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=269aa061 --sync: Decode getaddrinfo() errors properly Fixes UnicodeDecodeError in Python 2 with getaddrinfo() error messages that contain non-ASCII characters, e.g. in pl_PL.UTF-8 locale. Reviewed-by: Alexander Berntsen gentoo.org> Reviewed-by: Brian Dolbec gentoo.org> --- pym/_emerge/actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index e482744..66e18a4 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2345,7 +2345,8 @@ def _sync_repo(emerge_config, repo): family, socket.SOCK_STREAM)) except socket.error as e: writemsg_level( - "!!! getaddrinfo failed for '%s': %s\n" % (hostname, e), + "!!! getaddrinfo failed for '%s': %s\n" % (hostname, + _unicode_decode(e.strerror, encoding=_encodings['stdio'])), noiselevel=-1, level=logging.ERROR) if addrinfos: