diff options
author | Chad Austin <chad@imvu.com> | 2013-05-17 11:37:37 -0700 |
---|---|---|
committer | Chad Austin <chad@imvu.com> | 2013-05-17 13:03:57 -0700 |
commit | d641184152923a119b3c2b7fd51acc71997ff0cd (patch) | |
tree | 39ff213d8b2dae9535a9d8fa0dea56009778bfc7 /tools/cache.py | |
parent | a7c47e66eed5c2db9aac373f9b0d043d9f048703 (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.py | 5 |
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]: |