From cc4c807badc8d4ab5f19c23a40eb9105a24fec90 Mon Sep 17 00:00:00 2001 From: scivision Date: Sun, 28 Jan 2024 22:28:07 -0500 Subject: [PATCH] step by step for debugging --- src/findssh/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/findssh/__init__.py b/src/findssh/__init__.py index a8d4c7f..22ea06a 100644 --- a/src/findssh/__init__.py +++ b/src/findssh/__init__.py @@ -13,7 +13,9 @@ def get_lan_ip() -> ipaddress.IPv4Address | ipaddress.IPv6Address: ref: http://stackoverflow.com/a/23822431 """ - return ipaddress.ip_address(socket.gethostbyname(socket.gethostname())) + name = socket.gethostname() + host = socket.gethostbyname(name) + return ipaddress.ip_address(host) def address2net(