Skip to content

Commit a0f25d6

Browse files
committed
Use proper regex escaping
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 478c761 commit a0f25d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spdx/parsers/tagvaluebuilders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def checksum_from_sha1(value):
4242
checksum or None if does not match CHECKSUM_RE.
4343
"""
4444
# More constrained regex at lexer level
45-
CHECKSUM_RE = re.compile('SHA1:\s*([\S]+)', re.UNICODE)
45+
CHECKSUM_RE = re.compile('SHA1:\\s*([\\S]+)', re.UNICODE)
4646
match = CHECKSUM_RE.match(value)
4747
if match:
4848
return checksum.Algorithm(identifier='SHA1', value=match.group(1))

0 commit comments

Comments
 (0)