Skip to content

Commit 15f5cef

Browse files
Improve About app
1 parent 74894ec commit 15f5cef

File tree

1 file changed

+10
-5
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.about/assets

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def onCreate(self):
9292
next_partition = current.get_next_update()
9393
self._add_label(screen, f"Next update partition: {next_partition}")
9494
except Exception as e:
95-
print(f"Partition info got exception: {e}")
95+
error = f"Could not find partition info because: {e}\nIt's normal to get this error on desktop."
96+
print(error)
97+
self._add_label(screen, error)
9698

9799
# Machine info
98100
try:
@@ -104,11 +106,13 @@ def onCreate(self):
104106
self._add_label(screen, f"machine.wake_reason(): {machine.wake_reason()}")
105107
self._add_label(screen, f"machine.reset_cause(): {machine.reset_cause()}")
106108
except Exception as e:
107-
print(f"Additional board info got exception: {e}")
109+
error = f"Could not find machine info because: {e}\nIt's normal to get this error on desktop."
110+
print(error)
111+
self._add_label(screen, error)
108112

109113
# Freezefs info (production builds only)
110114
try:
111-
print("Trying to find out freezefs info, this only works on production builds...") # dev builds already have the /builtin folder
115+
print("Trying to find out freezefs info")
112116
self._add_label(screen, f"{lv.SYMBOL.DOWNLOAD} Frozen Filesystem", is_header=True)
113117
import freezefs_mount_builtin
114118
self._add_label(screen, f"freezefs_mount_builtin.date_frozen: {freezefs_mount_builtin.date_frozen}")
@@ -122,8 +126,9 @@ def onCreate(self):
122126
# and then they install a prod build (with OSUpdate) that then is unable to mount the freezefs into /builtin
123127
# BUT which will still have the frozen-inside /lib folder. So the user will be able to install apps into /builtin
124128
# but they will not be able to install libraries into /lib.
125-
print("main.py: WARNING: could not import/run freezefs_mount_builtin: ", e)
126-
self._add_label(screen, f"freezefs_mount_builtin exception (normal if internal storage partition has overriding /builtin folder): {e}")
129+
error = f"Could not get freezefs_mount_builtin info because: {e}\nIt's normal to get an exception if the internal storage partition contains an overriding /builtin folder."
130+
print(error)
131+
self._add_label(screen, error)
127132

128133
# Disk usage info
129134
self._add_label(screen, f"{lv.SYMBOL.DRIVE} Storage", is_header=True)

0 commit comments

Comments
 (0)