diff options
-rw-r--r-- | cache_manager.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/cache_manager.py b/cache_manager.py index 6d8ef05..28d9f0d 100644 --- a/cache_manager.py +++ b/cache_manager.py @@ -61,33 +61,6 @@ class _Cleanup(object): shutil.rmtree(self.tempdir) -class _Cleanup(object): - """This class makes sure we clean up when CacheManager goes away. - - We use a helper class to ensure that we are never in a refcycle. - """ - - def __init__(self, disk_blobs): - self.disk_blobs = disk_blobs - self.tempdir = None - self.small_blobs = None - - def __del__(self): - self.finalize() - - def finalize(self): - if self.disk_blobs is not None: - for info in self.disk_blobs.itervalues(): - if info[-1] is not None: - os.unlink(info[-1]) - self.disk_blobs = None - if self.small_blobs is not None: - self.small_blobs.close() - self.small_blobs = None - if self.tempdir is not None: - shutil.rmtree(self.tempdir) - - class CacheManager(object): _small_blob_threshold = 25*1024 |