From 7db336f2aac7ea53f44e62d7d32cb89ebd5b6c61 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 8 Feb 2026 03:33:43 +0300 Subject: [PATCH] Hide MACs when hostname present --- services/openwrt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/openwrt.py b/services/openwrt.py index 5e5d45b..5d6c193 100644 --- a/services/openwrt.py +++ b/services/openwrt.py @@ -242,7 +242,7 @@ def _parse_hostapd_clients( sig = f"{signal}dBm" if isinstance(signal, (int, float)) else "?" host = name_map.get(str(mac).lower()) if host and host != "unknown": - client_label = f"{host} ({mac})" + client_label = host else: client_label = str(mac) clients.append(f"{net_label} {client_label} {sig} rx:{rx} tx:{tx}") @@ -365,7 +365,7 @@ async def get_openwrt_status(cfg: dict[str, Any]) -> str: cmd_clients = ssh_cmd + ["ubus", "call", f"hostapd.{ifname}", "get_clients"] rc2, out2 = await run_cmd_full(cmd_clients, timeout=timeout_sec + 15) if rc2 == 124: - return f"?? OpenWrt SSH error (wifi clients {ifname}): timeout" + return f"⚠️ OpenWrt SSH error (wifi clients {ifname}): timeout" if rc2 == 0: payload = _safe_json_load(out2) if payload: