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 49
49
uos .mount (vfs , "/sd" )
50
50
except ImportError :
51
51
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." )
54
60
55
61
# Set the SPI bus baudrate (note - the sdcard module overrides the baudrate upon
56
62
# initialization, so the baudrate should be set after that). It is recommended
You can’t perform that action at this time.
0 commit comments