equal
deleted
inserted
replaced
87 |
87 |
88 def gethostaddr(self, dst='224.0.1.41'): |
88 def gethostaddr(self, dst='224.0.1.41'): |
89 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
89 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
90 try: |
90 try: |
91 s.connect((dst, 7)) |
91 s.connect((dst, 7)) |
92 (host, port) = s.getsockname() |
92 (host, _port) = s.getsockname() |
93 s.close() |
93 s.close() |
94 if host != '0.0.0.0': |
94 if host != '0.0.0.0': |
95 return host |
95 return host |
96 except Exception: |
96 except Exception: |
97 pass |
97 pass |