Skip to content

Commit ca878d0

Browse files
authored
Issue noted in Learn
Add the middle line between the first and last line in the example for setting up an SD Card. The first item is a '?' and the code crashes. On web page: https://learn.adafruit.com/adafruit-micro-sd-breakout-board-card-tutorial/circuitpython blakebr . . for file in os.listdir(path): if file == "?": continue print(file, path + "/" + file)
1 parent 237cb1a commit ca878d0

File tree

1 file changed

+1
-0
lines changed
  • Introducing_Trinket_M0/Trinket_SDCardList

1 file changed

+1
-0
lines changed

Introducing_Trinket_M0/Trinket_SDCardList/code.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
def print_directory(path, tabs=0):
3030
for file in os.listdir(path):
31+
if file == "?" : continue # Issue noted in Learn
3132
stats = os.stat(path + "/" + file)
3233
filesize = stats[6]
3334
isdir = stats[0] & 0x4000

0 commit comments

Comments
 (0)