Skip to content

Commit 7842ebb

Browse files
OSUpdate: make sure still foreground before showing update info
1 parent cc5f563 commit 7842ebb

File tree

1 file changed

+6
-5
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets

1 file changed

+6
-5
lines changed

internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,12 @@ def show_update_info(self, timer=None):
194194
try:
195195
# Use UpdateChecker to fetch update info
196196
update_info = self.update_checker.fetch_update_info(hwid)
197-
self.handle_update_info(
198-
update_info["version"],
199-
update_info["download_url"],
200-
update_info["changelog"]
201-
)
197+
if self.has_foreground():
198+
self.handle_update_info(
199+
update_info["version"],
200+
update_info["download_url"],
201+
update_info["changelog"]
202+
)
202203
except ValueError as e:
203204
# JSON parsing or validation error (not network related)
204205
self.set_state(UpdateState.ERROR)

0 commit comments

Comments
 (0)