From 4756571d818a7999786b42fd251bb0ca9b62c127 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 24 Dec 2025 10:40:14 +0100 Subject: [PATCH] osupdate: debugging --- .../apps/com.micropythonos.osupdate/assets/osupdate.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py b/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py index 20b05794..07d40c57 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py @@ -379,7 +379,7 @@ class OSUpdate(Activity): self._handle_update_exception(e) def _handle_update_error(self, result): - """Handle update error result - extracted for DRY.""" + print(f"Handle update error: {result}") error_msg = result.get('error', 'Unknown error') bytes_written = result.get('bytes_written', 0) total_size = result.get('total_size', 0) @@ -401,7 +401,7 @@ class OSUpdate(Activity): self.install_button.remove_state(lv.STATE.DISABLED) # allow retry def _handle_update_exception(self, e): - """Handle update exception - extracted for DRY.""" + print(f"Handle update exception: {e}") msg = self._get_user_friendly_error(e) + "\n\nPress 'Update OS' to retry." self.set_state(UpdateState.ERROR) self.status_label.set_text(msg) @@ -666,7 +666,8 @@ class UpdateDownloader: except Exception as e: error_msg = str(e) - + print(f"error_msg: {error_msg}") + # Check if cancelled by user if "cancelled" in error_msg.lower(): result['error'] = error_msg