@classmethod
    def rename_cache(cls, cache_dir, old_slug, new_slug):
        old_file = join(cache_dir, old_slug) + '.json.gz'
        new_file = join(cache_dir, new_slug) + '.json.gz'
        old_folder = join(cache_dir, old_slug)
        new_folder = join(cache_dir, new_slug)

        # delete the new folder is necessary, otherwise the
        # old one will just end up inside of it
        try:
            remove(new_file)
            rmtree(new_folder)
        except __HOLE__:
            pass
        try:
            rename(old_file, new_file)
            rename(old_folder, new_folder)
        except OSError:
            pass
# pylint: enable=R0902
dataset/ETHPy150Open turbulenz/turbulenz_local/turbulenz_local/lib/deploy.py/Deployment.rename_cache