'Extract matching files into the directory specified
Optionally delete the original archive if config.delete_archive is True'

def handle_entry(self, entry, config):

    match = re.compile(config[u'regexp'], re.IGNORECASE).match
    archive_path = entry.get(u'location')
    if (not archive_path):
        log.warning(u'Entry    does    not    appear    to    represent    a    local    file.')
        return
    archive_dir = os.path.dirname(archive_path)
    if (not os.path.exists(archive_path)):
        log.warning(u'File    no    longer    exists:    %s', archive_path)
        return
    arch = open_archive_entry(entry)
    if (not arch):
        return
    to = config[u'to']
    if to:
        try:
            to = render_from_entry(to, entry)
        except RenderError as error:
            log.error(u'Could    not    render    path:    %s', to)
            entry.fail(error)
            return
    else:
        to = archive_dir
    for info in arch.infolist():
        destination = get_destination_path(info.filename, to, config[u'keep_dirs'])
        dest_dir = os.path.dirname(destination)
        arch_file = os.path.basename(info.filename)
        if is_dir(info):
            log.debug(u'Appears    to    be    a    directory:    %s', info.filename)
            continue
        if (not match(arch_file)):
            log.debug(u'File    did    not    match    regexp:    %s', arch_file)
            continue
        log.debug(u'Found    matching    file:    %s', info.filename)
        log.debug(u'Creating    path:    %s', dest_dir)
        makepath(dest_dir)
        if os.path.exists(destination):
            log.verbose(u'File    already    exists:    %s', destination)
            continue
        error_message = u''
        log.debug(u'Attempting    to    extract:    %s    to    %s', arch_file, destination)
        try:
            arch.extract_file(info, destination)
        except archive.FSError as error:
            error_message = (u'OS    error    while    creating    file:    %s    (%s)' % (destination, error))
        except archive.ArchiveError as error:
            error_message = (u'Failed    to    extract    file:    %s    in    %s    (%s)' % (info.filename, archive_path, error))
        if error_message:
            log.error(error_message)
            entry.fail(entry)
            if os.path.exists(destination):
                log.debug(u'Cleaning    up    partially    extracted    file:    %s', destination)
                os.remove(destination)
            return
    if config[u'delete_archive']:
        arch.delete()
    else:
        arch.close()
