mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
of the day try block fix
This commit is contained in:
@@ -190,18 +190,18 @@ class OfTheDayManager:
|
|||||||
os.path.join(script_dir, '..', 'of_the_day', data_file),
|
os.path.join(script_dir, '..', 'of_the_day', data_file),
|
||||||
os.path.join('of_the_day', data_file)
|
os.path.join('of_the_day', data_file)
|
||||||
])
|
])
|
||||||
|
|
||||||
# Debug: Show all paths before deduplication
|
# Debug: Show all paths before deduplication
|
||||||
logger.debug(f"All possible paths before deduplication: {possible_paths}")
|
logger.debug(f"All possible paths before deduplication: {possible_paths}")
|
||||||
|
|
||||||
# Remove duplicates while preserving order
|
# Remove duplicates while preserving order
|
||||||
seen = set()
|
seen = set()
|
||||||
unique_paths = []
|
unique_paths = []
|
||||||
for path in possible_paths:
|
for path in possible_paths:
|
||||||
abs_path = os.path.abspath(path)
|
abs_path = os.path.abspath(path)
|
||||||
if abs_path not in seen:
|
if abs_path not in seen:
|
||||||
seen.add(abs_path)
|
seen.add(abs_path)
|
||||||
unique_paths.append(abs_path)
|
unique_paths.append(abs_path)
|
||||||
possible_paths = unique_paths
|
possible_paths = unique_paths
|
||||||
|
|
||||||
# Debug: Show paths after deduplication
|
# Debug: Show paths after deduplication
|
||||||
|
|||||||
Reference in New Issue
Block a user