Skip to content

Commit

Permalink
Ignore case for license files
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Nov 27, 2017
1 parent 749ab0c commit 968bc09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def _find_file(name, path):
for file_name in os.listdir(path):
match = re.match(name, file_name)
match = re.match(name, file_name, re.IGNORECASE)
if match != None:
return os.path.join(path, match.string)
return
Expand Down Expand Up @@ -281,7 +281,7 @@ def _check_file_whitelist(error_counter, file_index, addon_path):
# This will not check "README" or ".gitignore"
if len(file_parts) > 1:
file_ending = "." + file_parts[len(file_parts)-1]
if re.match(whitelist, file_ending.lower()) is None:
if re.match(whitelist, file_ending, re.IGNORECASE) is None:
error_counter = _logProblem(error_counter, "Found non whitelisted file ending in filename %s" % (
os.path.join(file["path"], file["name"])))

Expand Down

0 comments on commit 968bc09

Please sign in to comment.