'Remove items from manifest that contain invalid data. This prevents
catastrophic conversion failure, when a few files contain corrupted
data.'

def _manifest_prune_invalid(self):

    bad = []
    check = OEB_DOCS.union(OEB_STYLES)
    for item in list(self.oeb.manifest.values()):
        if (item.media_type in check):
            try:
                item.data
            except KeyboardInterrupt:
                raise
            except:
                self.logger.exception(('Failed    to    parse    content    in    %s' % item.href))
                bad.append(item)
                self.oeb.manifest.remove(item)
    return bad
