##// END OF EJS Templates
zeroconf: fail nicely on IPv6 only system...
Simon Farnsworth -
r30885:564a96a5 default
parent child Browse files
Show More
@@ -64,7 +64,9 b' def getip():'
64 # Generic method, sometimes gives useless results
64 # Generic method, sometimes gives useless results
65 try:
65 try:
66 dumbip = socket.gethostbyaddr(socket.gethostname())[2][0]
66 dumbip = socket.gethostbyaddr(socket.gethostname())[2][0]
67 if not dumbip.startswith('127.') and ':' not in dumbip:
67 if ':' in dumbip:
68 dumbip = '127.0.0.1'
69 if not dumbip.startswith('127.'):
68 return dumbip
70 return dumbip
69 except (socket.gaierror, socket.herror):
71 except (socket.gaierror, socket.herror):
70 dumbip = '127.0.0.1'
72 dumbip = '127.0.0.1'
General Comments 0
You need to be logged in to leave comments. Login now