Example #1
0
    def save_cache(cls, outputdir):
        cache_file = os.path.join(outputdir, "uuidcache.dat")

        with FileReplacer(cache_file) as cache_file_name:
            with closing(gzip.GzipFile(cache_file_name, "wb")) as gz:
                json.dump(cls.uuid_cache, gz)
                logging.info("Wrote UUID cache with %d entries",
                             len(cls.uuid_cache.keys()))
Example #2
0
    def save_cache(cls, outputdir):
        cache_file = os.path.join(outputdir, "uuidcache.dat")
        caps = get_fs_caps(outputdir)

        with FileReplacer(cache_file, caps) as cache_file_name:
            with closing(gzip.GzipFile(cache_file_name, "wb")) as gz:
                gz.write(json.dumps(cls.uuid_cache).encode())
                logging.info("Wrote UUID cache with %d entries.",
                             len(cls.uuid_cache.keys()))