diff options
author | Chad Austin <chad@imvu.com> | 2013-02-20 13:58:20 -0800 |
---|---|---|
committer | Chad Austin <chad@imvu.com> | 2013-03-04 19:34:54 -0800 |
commit | 4bde971a1f51eaa9c6da2e54a295ff04183cbab5 (patch) | |
tree | 29c3627dc1b04ef387b5d2f4c5087f5f7b140b32 /tools/cache.py | |
parent | d84a4ec1a48534211afc89590bd04af4cfd27f13 (diff) |
Isolate shutil.rmtree logic in tempfiles.try_delete, and integrate azakai's feedback
Diffstat (limited to 'tools/cache.py')
-rw-r--r-- | tools/cache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/cache.py b/tools/cache.py index 78a11ba0..2958197c 100644 --- a/tools/cache.py +++ b/tools/cache.py @@ -1,4 +1,5 @@ import os.path, shutil, hashlib, cPickle +from . import tempfiles # Permanent cache for dlmalloc and stdlibc++ class Cache: @@ -14,7 +15,7 @@ class Cache: os.makedirs(self.dirname) def erase(self): - shutil.rmtree(self.dirname, ignore_errors=True) + tempfiles.try_delete(self.dirname) def get_path(self, shortname): return os.path.join(self.dirname, shortname) |