aboutsummaryrefslogtreecommitdiff
path: root/tools/cache.py
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-05-17 11:37:37 -0700
committerChad Austin <chad@imvu.com>2013-05-17 13:03:57 -0700
commitd641184152923a119b3c2b7fd51acc71997ff0cd (patch)
tree39ff213d8b2dae9535a9d8fa0dea56009778bfc7 /tools/cache.py
parenta7c47e66eed5c2db9aac373f9b0d043d9f048703 (diff)
Fix a race condition if two emscripten.py instances run at the same time
Diffstat (limited to 'tools/cache.py')
-rw-r--r--tools/cache.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/cache.py b/tools/cache.py
index 13a53fe9..c316a1fd 100644
--- a/tools/cache.py
+++ b/tools/cache.py
@@ -49,7 +49,10 @@ class JCache:
def ensure(self):
self.cache.ensure()
if not os.path.exists(self.dirname):
- os.makedirs(self.dirname)
+ try:
+ os.makedirs(self.dirname)
+ except (IOError, OSError):
+ pass
def get_shortkey(self, keys):
if type(keys) not in [list, tuple]: