def verify_hash(filename, sha1):
    'Return True if the sha1 of the given file match the sha1 passed in.'
    file_sha1 = hash_file(filename)
    if (sha1 != file_sha1):
        raise HashVerificationError(('verification failed: %s\nExpected: %s\nActual: %s' % (filename, sha1, file_sha1)))
Return True if the sha1 of the given file match the sha1 passed in.
def verify_hash(filename, sha1):
    
    file_sha1 = hash_file(filename)
    if (sha1 != file_sha1):
        raise HashVerificationError(('verification failed: %s\nExpected: %s\nActual: %s' % (filename, sha1, file_sha1)))