diff options
Diffstat (limited to 'anteater/src/patch_scan.py')
-rw-r--r-- | anteater/src/patch_scan.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/anteater/src/patch_scan.py b/anteater/src/patch_scan.py index 0a32f3e..1deb68f 100644 --- a/anteater/src/patch_scan.py +++ b/anteater/src/patch_scan.py @@ -147,9 +147,9 @@ def licence_check(project, licence_ext, # Note: Hardcoded use of 'copyright' & 'spdx' is the result # of a decision made at 2017 plugfest to limit searches to # just these two strings. - if re.search("copyright", content, re.IGNORECASE): - logger.info('Contains needed Licence string: %s', patch_file) - elif re.search("spdx", content, re.IGNORECASE): + patterns = ['copyright', 'spdx', + 'http://creativecommons.org/licenses/by/4.0'] + if any(i in content.lower() for i in patterns): logger.info('Contains needed Licence string: %s', patch_file) else: logger.error('Licence header missing in file: %s', patch_file) |