Skip to content

Commit

Permalink
Check if extension is in counter dictionary in MOSS check
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol authored and geordi committed Mar 25, 2024
1 parent 321547a commit 4b1b643
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/moss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def is_source_valid(logger, source) -> bool:
def add_file(logger, moss: mosspy.Moss, file_path: str, name: str, counters):
logger.info(f"Adding file {name} from {file_path}")
ext = name.split('.')[-1].lower()
counters[ALLOWED_EXTENSIONS[ext]] += 1
if ext in ALLOWED_EXTENSIONS:
counters[ALLOWED_EXTENSIONS[ext]] += 1
moss.addFile(file_path, name)


Expand Down

0 comments on commit 4b1b643

Please sign in to comment.