From 5945ded816579588e719884efec84f25c465b135 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Thu, 11 Dec 2025 07:10:36 +0300 Subject: [PATCH] Fix incompatibility with 3.6; more specific regex --- jc/parsers/hashsum.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jc/parsers/hashsum.py b/jc/parsers/hashsum.py index 187185e9..da01b36c 100644 --- a/jc/parsers/hashsum.py +++ b/jc/parsers/hashsum.py @@ -140,7 +140,8 @@ def parse(data, raw=False, quiet=False): file_mode = "" # standard md5sum and shasum command output else: - if not (m:= re.match('(\S+) ([ ?*])(.*)$', line)): + m = re.match('[0-9a-f]+ ([ ?*])(.*)$', line) + if not m: raise ValueError(f'Invalid line format: "{line}"') file_hash, file_mode, file_name = m.groups()