##// END OF EJS Templates
utils.localinterfaces: Uniquify LOCAL_IPS...
W. Trevor King -
Show More
@@ -19,6 +19,8 b' LOCAL_IPS : A list of IP addresses, loopback first, that point to this machine.'
19
19
20 import socket
20 import socket
21
21
22 from .data import uniq_stable
23
22 #-----------------------------------------------------------------------------
24 #-----------------------------------------------------------------------------
23 # Code
25 # Code
24 #-----------------------------------------------------------------------------
26 #-----------------------------------------------------------------------------
@@ -37,4 +39,6 b' except socket.gaierror:'
37 # include all-interface aliases: 0.0.0.0 and ''
39 # include all-interface aliases: 0.0.0.0 and ''
38 LOCAL_IPS.extend(['0.0.0.0', ''])
40 LOCAL_IPS.extend(['0.0.0.0', ''])
39
41
42 LOCAL_IPS = uniq_stable(LOCAL_IPS)
43
40 LOCALHOST = LOCAL_IPS[0]
44 LOCALHOST = LOCAL_IPS[0]
General Comments 0
You need to be logged in to leave comments. Login now