Skip to content

Commit 9034c1c

Browse files
OSUpdate: don't update UI after exit
1 parent 1bf52a1 commit 9034c1c

File tree

1 file changed

+2
-1
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ def update_with_lvgl(self, url):
198198
lv.async_call(lambda l: self.status_label.set_text(f"Wrote {bytes_written} < {total_size} so not enough!"), None)
199199
self.install_button.remove_state(lv.STATE.DISABLED) # allow retry
200200
except Exception as e:
201-
lv.async_call(lambda l: self.status_label.set_text(f"Update error: {e}"), None)
201+
if self.keep_running:
202+
lv.async_call(lambda l: self.status_label.set_text(f"Update error: {e}"), None)
202203
self.install_button.remove_state(lv.STATE.DISABLED) # allow retry
203204

204205
# Non-class functions:

0 commit comments

Comments
 (0)