Mercurial > hg
changeset 10317:192083a3e6fe stable
zeroconf: gethostbyaddr may also fail with socket.herror
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 05 Feb 2010 10:16:52 -0600 |
parents | be324d31b6c5 |
children | 325a6aa95eea d355cebde5e6 |
files | hgext/zeroconf/__init__.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/zeroconf/__init__.py Fri Feb 05 04:33:08 2010 -0600 +++ b/hgext/zeroconf/__init__.py Fri Feb 05 10:16:52 2010 -0600 @@ -49,7 +49,7 @@ dumbip = socket.gethostbyaddr(socket.gethostname())[2][0] if not dumbip.startswith('127.') and ':' not in dumbip: return dumbip - except socket.gaierror: + except (socket.gaierror, socket.herror): dumbip = '127.0.0.1' # works elsewhere, but actually sends a packet