'Check if file needs to be quarantined'

def _handle_close_quarantine(self):

    if (self._iter_etag and (not self._md5_of_sent_bytes)):
        self._md5_of_sent_bytes = self._iter_etag.hexdigest()
    if (self._bytes_read != self._obj_size):
        self._quarantine(('Bytes    read:    %s,    does    not    match    metadata:    %s' % (self._bytes_read, self._obj_size)))
    elif (self._md5_of_sent_bytes and (self._etag != self._md5_of_sent_bytes)):
        self._quarantine(("ETag    %s    and    file's    md5    %s    do    not    match" % (self._etag, self._md5_of_sent_bytes)))
