From 4fe3377029189ba3a91058f0d6bbdcadb9aece01 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Mon, 15 Dec 2025 23:31:16 +0300 Subject: [PATCH] Support other mode symbols -- e.g. 'U' and '^' from Perl shasum Accept any symbol for future-proofing --- jc/parsers/hashsum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jc/parsers/hashsum.py b/jc/parsers/hashsum.py index 60ba742b..c86e41d7 100644 --- a/jc/parsers/hashsum.py +++ b/jc/parsers/hashsum.py @@ -140,7 +140,7 @@ def parse(data, raw=False, quiet=False): file_mode = "" # standard md5sum and shasum command output else: - m = re.match('([0-9a-f]+) ([ ?*])(.*)$', 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()