* [gentoo-portage-dev] [PATCH] --sync: properly decode getaddrinfo() errors.
@ 2014-08-12 18:22 Michał Górny
2014-08-12 18:30 ` Michał Górny
0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2014-08-12 18:22 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Michał Górny
Fixes UnicodeDecodeError in Python 2 with getaddrinfo() error messages
that contain non-ASCII characters, e.g. in pl_PL.UTF-8 locale.
---
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:
--
2.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] --sync: properly decode getaddrinfo() errors.
2014-08-12 18:22 [gentoo-portage-dev] [PATCH] --sync: properly decode getaddrinfo() errors Michał Górny
@ 2014-08-12 18:30 ` Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2014-08-12 18:30 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
Dnia 2014-08-12, o godz. 20:22:43
Michał Górny <mgorny@gentoo.org> napisał(a):
> Fixes UnicodeDecodeError in Python 2 with getaddrinfo() error messages
> that contain non-ASCII characters, e.g. in pl_PL.UTF-8 locale.
And pushed.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-12 18:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12 18:22 [gentoo-portage-dev] [PATCH] --sync: properly decode getaddrinfo() errors Michał Górny
2014-08-12 18:30 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox