From f80d58afa668f9e571a19492671a6eeb847edf96 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 10 Oct 2024 12:24:33 -0300 Subject: [PATCH] wifi: add stdout to errors Yes this could be somewhat verbose, but verbosity is better than no information --- core/services/wifi/wifi_handlers/wpa_supplicant/Hotspot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/services/wifi/wifi_handlers/wpa_supplicant/Hotspot.py b/core/services/wifi/wifi_handlers/wpa_supplicant/Hotspot.py index 5230b8856a..cc4bafb80e 100644 --- a/core/services/wifi/wifi_handlers/wpa_supplicant/Hotspot.py +++ b/core/services/wifi/wifi_handlers/wpa_supplicant/Hotspot.py @@ -176,7 +176,8 @@ def start(self) -> None: time.sleep(3) if not self.is_running(): exit_code = self._subprocess.returncode - raise RuntimeError(f"Failed to initialize Hostapd ({exit_code}).") + stdout, _ = self._subprocess.communicate() + raise RuntimeError(f"Failed to initialize Hostapd ({exit_code}). Output: {stdout}") if not self._dhcp_server: self._dhcp_server = DHCPServerManager(self._ap_interface_name, self._ipv4_gateway) return