File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/spdx_tools/spdx/validation Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1818download_location_pattern = (
1919 "^(((" + supported_download_repos + "\\ +)?" + url_pattern + ")|" + git_pattern + "|" + bazaar_pattern + ")$"
2020)
21+ compiled_pattern = re .compile (download_location_pattern , re .IGNORECASE )
2122
2223
2324def validate_url (url : str ) -> List [str ]:
@@ -28,7 +29,7 @@ def validate_url(url: str) -> List[str]:
2829
2930
3031def validate_download_location (location : str ) -> List [str ]:
31- if not (validate_url (location ) == [] or re .match (download_location_pattern , location )):
32+ if not (validate_url (location ) == [] or compiled_pattern .match (location )):
3233 return [f"must be a valid URL or download location according to the specification, but is: { location } " ]
3334
3435 return []
You can’t perform that action at this time.
0 commit comments