File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
internal_filesystem/lib/mpos Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,14 @@ def _try_mount(self, mount_point):
2121 print (f"SD card mounted successfully at { mount_point } " )
2222 return True
2323 except OSError as e :
24- if e .errno == errno .EPERM : # EPERM is 1, meaning already mounted
24+ errno = - 1
25+ try :
26+ errno = e .errno
27+ except NameError as we :
28+ print ("Got this weird (sporadic) \" NameError: name 'errno' isn't defined\" again when parsing OSError: {we}" )
29+ print (f"Original exception: { e } " )
30+ print (dir (e ))
31+ if errno == errno .EPERM : # EPERM is 1, meaning already mounted
2532 print (f"Got mount error { e } which means already mounted." )
2633 return True
2734 else :
@@ -132,7 +139,7 @@ def get():
132139 """Get the global SD card manager instance."""
133140 if _manager is None :
134141 print ("ERROR: SDCardManager not initialized" )
135- print (" - Call init(spi_bus, cs_pin) first in boot.py or main .py" )
142+ print (" - Call init(spi_bus, cs_pin) first in lib/mpos/board/* .py" )
136143 return _manager
137144
138145def mount (mount_point ):
You can’t perform that action at this time.
0 commit comments