Show More
@@ -49,7 +49,7 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