##// END OF EJS Templates
zeroconf: gethostbyaddr may also fail with socket.herror
Augie Fackler -
r10317:192083a3 stable
parent child Browse files
Show More
@@ -49,7 +49,7 b' def getip():'
49 dumbip = socket.gethostbyaddr(socket.gethostname())[2][0]
49 dumbip = socket.gethostbyaddr(socket.gethostname())[2][0]
50 if not dumbip.startswith('127.') and ':' not in dumbip:
50 if not dumbip.startswith('127.') and ':' not in dumbip:
51 return dumbip
51 return dumbip
52 except socket.gaierror:
52 except (socket.gaierror, socket.herror):
53 dumbip = '127.0.0.1'
53 dumbip = '127.0.0.1'
54
54
55 # works elsewhere, but actually sends a packet
55 # works elsewhere, but actually sends a packet
General Comments 0
You need to be logged in to leave comments. Login now