From 7648897ef019ab03561ac2bd16735870ce736b40 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 14 Jun 2025 11:54:13 +0200 Subject: [PATCH] WiFi: make more robust --- .../builtin/apps/com.micropythonos.wifi/assets/wifi.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal_filesystem/builtin/apps/com.micropythonos.wifi/assets/wifi.py b/internal_filesystem/builtin/apps/com.micropythonos.wifi/assets/wifi.py index 9cc9a6b4..a0dcf919 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.wifi/assets/wifi.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.wifi/assets/wifi.py @@ -74,8 +74,6 @@ class WiFi(Activity): def onStop(self, screen): self.keep_running = False - if self.error_timer: - self.error_timer.delete() def show_error(self, message): if self.keep_running: # called from slow threads so might already have stopped @@ -88,7 +86,10 @@ class WiFi(Activity): def hide_error(self, timer): if self.keep_running: - self.error_label.add_flag(lv.obj.FLAG.HIDDEN) + try: # self.error_label might be None + self.error_label.add_flag(lv.obj.FLAG.HIDDEN) + except Exception as e: + print(f"self.error_label.add_flag(lv.obj.FLAG.HIDDEN) got exception: {e}") def scan_networks_thread(self): global have_network