def verify_catalog(catalog, should_lock=False, **kwargs):

    index = catalog.get_index()
    manifests = list()
    ph = catalog.path_helper

    def results():

        # TODO: fix private ref to _bundle_info_by_name
        for (bundle_name, bundle_info) in index._bundle_info_by_name.iteritems():
            for version in bundle_info['versions']:
                manifest_name = ph.manifest_name(bundle_name, version)
                yield Message.info("Loading %s" % (manifest_name))
                manifest = catalog.get_manifest(bundle_name, version)
                if manifest is None:
                    yield Message.error("manifest not found: %s" % (manifest_name))
                    continue
                manifests.append(manifest)

        verified_files = set()
        for manifest in manifests:
            yield Message.info("Verifying %s-%d" % (manifest.bundle_name,
                                                    manifest.version))
            for result in _verify_bundle_with_manifest(catalog, manifest,
                                                       verified_files=verified_files):
                yield result

    return ResultSet(results)
dataset/ETHPy150Open mindsnacks/Zinc/src/zinc/client.py/verify_catalog/original