Removed CR, change error catch to specific error
@@ -20,8 +20,8 @@ try:
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
IMAGE_DIRECTORY = "/sd/images"
-except Exception as e:
- print("No SD card, will only look on internal memory, {0}.".format(e.message))
+except OSerror:
+ print("No SD card, will only look on internal memory")
def print_directory(path, tabs=0):
for file in os.listdir(path):
@@ -50,7 +50,7 @@ def print_directory(path, tabs=0):
print_directory(IMAGE_DIRECTORY)
-# Create the slideshow object that plays through once alphabetically.
+# Create the slideshow object that plays through once alphabetically
slideshow = SlideShow(board.DISPLAY, None, folder=IMAGE_DIRECTORY, loop=True,
order=PlayBackOrder.ALPHABETICAL, dwell=0)
while True:
