mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2026-04-01 17:41:06 +02:00
Fix incompatibility with 3.6; more specific regex
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user