streamcorpus_pipeline/_s3_storage.py
def verify_md5(md5_expected, data, other_errors=None):
    "return True if okay, raise Exception if not"  # O_o ?
    md5_recv = hashlib.md5(data).hexdigest()
    if md5_expected != md5_recv:
        if other_errors is not None:
            logger.critical('\n'.join(other_errors))
        raise FailedVerification('original md5 = %r != %r = received md5' \
                                 % (md5_expected, md5_recv))
    return True
def verify_md5(md5_expected, data, other_errors=None):
    "return True if okay, raise Exception if not"  # O_o ?
    md5_recv = hashlib.md5(data).hexdigest()
    if md5_expected != md5_recv:
        if other_errors is not None:
            logger.critical('\n'.join(other_errors))
        raise FailedVerification('original md5 = %r != %r = received md5' \
                                 % (md5_expected, md5_recv))
    return True
def verify_md5 ( md5_expected , data , other_errors = None ) : # O_o ? md5_recv = hashlib . md5 ( data ) . hexdigest ( ) if md5_expected != md5_recv : if other_errors is not None : logger . critical ( '\n' . join ( other_errors ) ) raise FailedVerification ( 'original md5 = %r != %r = received md5' % ( md5_expected , md5_recv ) ) return True
return True if okay, raise Exception if not
return True if okay raise Exception if not