Skip to content

Commit

Permalink
Update: Error handling missing folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Feb 16, 2024
1 parent 216777f commit 5848429
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/border_replacerr.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ def process_files(source_dirs, destination_dir, dry_run):
# Check for a scheduled event to update border colors if provided
if schedule:
border_colors, run_holiday, holiday = check_holiday(schedule, border_colors)

if not os.path.exists(destination_dir):
logger.error(f"Output directory {destination_dir} does not exist.")
return

assets_list = []
# Categorize files in the input directory into assets
Expand Down Expand Up @@ -539,7 +543,6 @@ def main():
# Process files in the input directory with specified settings
process_files(source_dirs, destination_dir, dry_run)

logger.info(f"Border Replacer Complete") # Log completion message
except KeyboardInterrupt:
print("Keyboard Interrupt detected. Exiting...")
sys.exit()
Expand Down

0 comments on commit 5848429

Please sign in to comment.