Skip to content

Commit 35dd446

Browse files
authored
Update code-multi-pyportal-direct.py
1 parent 17f9688 commit 35dd446

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CircuitPython_gifio/PyPortal/code-multi-pyportal-direct.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
# Play Multiple GIF files on a PyPortal
66
# Requires CircuitPython 8.1.0-beta.1 or later
77
# Updated 4/4/2023
8+
9+
import time
10+
import gc
811
import os
912
import struct
1013
import board
1114
import gifio
12-
import time
1315
import adafruit_touchscreen
14-
import gc
1516

1617
# Get a dictionary of GIF filenames at the passed base directory
1718
def get_files(base):
1819
files = os.listdir(base)
1920
file_names = []
20-
for j, filetext in enumerate(files):
21+
for _, filetext in enumerate(files):
2122
if not filetext.startswith("."):
2223
if filetext not in ('boot_out.txt', 'System Volume Information'):
2324
if filetext.endswith(".gif"):
@@ -44,7 +45,7 @@ def get_files(base):
4445
# Skip Feather GIFs if put on PyPortal
4546
if odg.width != WIDTH:
4647
print("File "+files[i]+" not right width, skipping\n")
47-
pass
48+
continue
4849

4950
start = time.monotonic()
5051
next_delay = odg.next_frame() # Load the first frame

0 commit comments

Comments
 (0)