added error output to get_ip

This commit is contained in:
Joel Klimont 2021-10-06 13:20:21 +02:00
parent 436ef35d46
commit 881f8ddbf8
5 changed files with 6 additions and 4 deletions

View file

@ -48,6 +48,7 @@ def get_ip():
IP = s.getsockname()[0]
except Exception:
IP = '127.0.0.1'
print(f"Error could not query ip: {e}")
finally:
s.close()
return IP