File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
internal_filesystem/lib/mpos Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,15 @@ 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- print (f"WARNING: Failed to mount SD card at { mount_point } : { e } " )
25- print (" - Possible causes: Unformatted SD card (needs FAT32), corrupted filesystem, or card removed" )
26- print (f" - Check: SD card format, ensure card is inserted" )
27- print (" - Try: Format card on PC, or proceed to auto-format if enabled" )
28- return False
24+ if e .errno == errno .EPERM : # EPERM is 1, meaning already mounted
25+ print (f"Got mount error { e } which means already mounted." )
26+ return True
27+ else :
28+ print (f"WARNING: Failed to mount SD card at { mount_point } : { e } " )
29+ print (" - Possible causes: Unformatted SD card (needs FAT32), corrupted filesystem, or card removed" )
30+ print (f" - Check: SD card format, ensure card is inserted" )
31+ print (" - Try: Format card on PC, or proceed to auto-format if enabled" )
32+ return False
2933
3034 def _format (self , mount_point ):
3135 try :
You can’t perform that action at this time.
0 commit comments