Show More
@@ -52,7 +52,7 b' def getip():' | |||||
52 |
|
52 | |||
53 | # Generic method, sometimes gives useless results |
|
53 | # Generic method, sometimes gives useless results | |
54 | dumbip = socket.gethostbyaddr(socket.gethostname())[2][0] |
|
54 | dumbip = socket.gethostbyaddr(socket.gethostname())[2][0] | |
55 | if not dumbip.startswith('127.'): |
|
55 | if not dumbip.startswith('127.') and ':' not in dumbip: | |
56 | return dumbip |
|
56 | return dumbip | |
57 |
|
57 | |||
58 | # works elsewhere, but actually sends a packet |
|
58 | # works elsewhere, but actually sends a packet |
General Comments 0
You need to be logged in to leave comments.
Login now