Show hostname when getaddrinfo fails. v2.2_rc95
authorZac Medico <zmedico@gentoo.org>
Wed, 13 Oct 2010 15:57:53 +0000 (08:57 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 13 Oct 2010 15:57:53 +0000 (08:57 -0700)
pym/_emerge/actions.py

index d395864b9643e0b9b61c8780ec1cdbd1554ec2b8..86e6a529ffd3164fc9f4877f8afd58b244a133bf 100644 (file)
@@ -2102,7 +2102,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
                        addrinfos = socket.getaddrinfo(hostname, None,
                                family, socket.SOCK_STREAM)
                except socket.error as e:
-                       writemsg("!!! getaddrinfo failed: %s\n" % (e,), noiselevel=-1)
+                       writemsg("!!! getaddrinfo failed for '%s': %s\n" % (hostname, e), noiselevel=-1)
                        # With some configurations we need to use the plain hostname
                        # rather than try to resolve the ip addresses (bug #340817).
                        uris.append(syncuri)