added error output to get_ip
This commit is contained in:
parent
436ef35d46
commit
881f8ddbf8
5 changed files with 6 additions and 4 deletions
|
@ -165,8 +165,9 @@ def get_ip():
|
|||
try:
|
||||
s.connect(('10.255.255.255', 1))
|
||||
IP = s.getsockname()[0]
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
IP = '127.0.0.1'
|
||||
print(f"Error could not query ip: {e}")
|
||||
finally:
|
||||
s.close()
|
||||
return IP
|
||||
|
|
Reference in a new issue