File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 4949 uos .mount (vfs , "/sd" )
5050except ImportError :
5151 print ("boot.py - sdcard module not found, skipping SD card initialization." )
52- except OSError :
53- print ("boot.py - Failed to mount SD card, skipping SD card initialization." )
52+ except OSError as e :
53+ eStr = str (e )
54+ if "no SD card" in eStr :
55+ print ("boot.py - no SD card found, skipping SD card initialization." )
56+ elif "Errno 1" in eStr :
57+ print ("boot.py - SD card already mounted, skipping SD card initialization." )
58+ else :
59+ print ("boot.py - Failed to mount SD card, skipping SD card initialization." )
5460
5561# Set the SPI bus baudrate (note - the sdcard module overrides the baudrate upon
5662# initialization, so the baudrate should be set after that). It is recommended
You can’t perform that action at this time.
0 commit comments