repair app.py
This commit is contained in:
parent
20edac4cdf
commit
e87312e1da
|
@ -146,7 +146,8 @@ class App:
|
||||||
|
|
||||||
def get_host(self):
|
def get_host(self):
|
||||||
ips = gethostbyname_ex(gethostname())[2]
|
ips = gethostbyname_ex(gethostname())[2]
|
||||||
for ip in ips:
|
if len(ips) > 1:
|
||||||
if ip.split(".")[2] == "1":
|
for ip in ips:
|
||||||
return ip
|
if ip.split(".")[2] == "1":
|
||||||
return ips[1]
|
return ip
|
||||||
|
return ips[0]
|
||||||
|
|
Loading…
Reference in New Issue