Skip to content

Commit

Permalink
Update repo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jgroom33 authored Apr 10, 2024
1 parent dda8ed8 commit e491715
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ def parse_files(self, files: list, slugs: list = None):
# Save file location to resolve any relative paths for images
data['src'] = file

if slugs and True not in [True if s.casefold() in data['slug'].casefold() else False for s in slugs]:
self.handle.verbose_log(f"Skipping {data['model']}")
continue
if slugs:
slug_present = any(s.casefold() in data.get('slug', '').casefold() for s in slugs)
if not slug_present:
self.handle.verbose_log(f"Skipping {data['model']}")
continue

deviceTypes.append(data)
return deviceTypes

0 comments on commit e491715

Please sign in to comment.