File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2626KEYWORD_DOWNLOAD_LOC = r'DownloadLocation\s*[\S]+'
2727KEYWORD_SCANCODE_UNKNOWN = "unknown-spdx"
2828SPDX_REPLACE_WORDS = ["(" , ")" ]
29- KEY_AND = r"(?<![a-zA-Z\d]) and(?![a-zA-Z\d]) "
30- KEY_OR = r"(?<![a-zA-Z\d])or(?![a-zA-Z\d]) "
29+ KEY_AND = " and"
30+ KEY_OR = "or "
3131
3232
3333def get_error_from_header (header_item ):
@@ -182,8 +182,8 @@ def split_spdx_expression(spdx_string):
182182 license = []
183183 for replace in SPDX_REPLACE_WORDS :
184184 spdx_string = spdx_string .replace (replace , "" )
185- spdx_string = re . sub (KEY_OR , KEY_AND , spdx_string )
186- license = spdx_string .split (KEY_AND . strip () )
185+ spdx_string = spdx_string . replace (KEY_OR , KEY_AND )
186+ license = spdx_string .split (KEY_AND )
187187 return license
188188
189189
You can’t perform that action at this time.
0 commit comments