Skip to content

Commit

Permalink
clear trackers meta if none before iterating over it
Browse files Browse the repository at this point in the history
Fixes #81
  • Loading branch information
Audionut committed Oct 14, 2024
1 parent 3b4c1f3 commit 2b39f6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ async def check_and_collect(image_dict):
if isinstance(meta.get('trackers', ''), str):
meta['trackers'] = [tracker.strip() for tracker in meta['trackers'].split(',')]

# if trackers is none then it need to be blanked
if meta.get('trackers') is None:
meta['trackers'] = []

# Issue warning if any valid image is on an unapproved host and MTV is in the trackers list
if 'MTV' in trackers_list or 'MTV' in meta.get('trackers', []):
if invalid_host_found:
Expand Down

0 comments on commit 2b39f6f

Please sign in to comment.