'Audits the given object location.
:param location: an audit location
(from diskfile.object_audit_location_generator)'

def object_audit(self, location):

    def raise_dfq(msg):
        raise DiskFileQuarantined(msg)
    diskfile_mgr = self.diskfile_router[location.policy]
    df = diskfile_mgr.get_diskfile_from_audit_location(location)
    reader = None
    try:
        with df.open():
            metadata = df.get_metadata()
            obj_size = int(metadata['Content-Length'])
            if self.stats_sizes:
                self.record_stats(obj_size)
            if (obj_size and (not self.zero_byte_only_at_fps)):
                reader = df.reader(_quarantine_hook=raise_dfq)
        if reader:
            with closing(reader):
                for chunk in reader:
                    chunk_len = len(chunk)
                    self.bytes_running_time = ratelimit_sleep(self.bytes_running_time, self.max_bytes_per_second, incr_by=chunk_len)
                    self.bytes_processed += chunk_len
                    self.total_bytes_processed += chunk_len
    except DiskFileQuarantined as err:
        self.quarantines += 1
        self.logger.error(_('ERROR    Object    %(obj)s    failed    audit    and    was    quarantined:    %(err)s'), {'obj': location, 'err': err})
    except DiskFileExpired:
        pass
    except DiskFileDeleted:
        ts = df._ondisk_info['ts_info']['timestamp']
        if ((not self.zero_byte_only_at_fps) and ((time.time() - float(ts)) > df.manager.reclaim_age)):
            df.manager.invalidate_hash(dirname(df._datadir))
    except DiskFileNotExist:
        pass
    self.passes += 1
    ondisk_info_dict = (df._ondisk_info or {})
    if ('unexpected' in ondisk_info_dict):
        is_rsync_tempfile = (lambda fpath: diskfile.RE_RSYNC_TEMPFILE.match(basename(fpath)))
        rsync_tempfile_paths = filter(is_rsync_tempfile, ondisk_info_dict['unexpected'])
        mtime = (time.time() - self.rsync_tempfile_timeout)
        unlink_paths_older_than(rsync_tempfile_paths, mtime)
