def read_sha1_file(checksum_file) -> str:
    """ Returns the 40 hex characters sha1 from file. """
    checksum_length = 40

    with open(checksum_file, 'r') as f:
        checksum = f.read()[:checksum_length]
    return checksum