- Detecting a new format should be more common

This commit is contained in:
Stepan Oksanichenko 2024-09-28 00:49:38 +03:00
parent 1e8aafba61
commit 3a7c84896f
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B

View File

@ -91,7 +91,8 @@ def get_file_checksum(file_path: str, checksum_type: str = 'sha1',
def extract_checksum_and_file_path(line: str) -> Tuple[str, str]:
if 'SHA512' in line.upper():
# new format
if '=' in line.upper():
file_path, checksum = line.split('=')
file_path = file_path.strip().split(' ')[1].strip('(').strip(')')
checksum = checksum.strip()