Skip to content

Commit

Permalink
Fixes bug #959262 - Prevent a failure to create the cache directory f…
Browse files Browse the repository at this point in the history
…rom causing an exception.

Change-Id: Ia80b50b32f5e3d0e76f4a1b251e23bbd3c70666e
  • Loading branch information
kiall authored and bcwaldon committed Mar 27, 2012
1 parent aa0e87f commit 10d226f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions novaclient/base.py
Expand Up @@ -114,10 +114,10 @@ def completion_cache(self, cache_type, obj_class, mode):
try:
os.makedirs(cache_dir, 0755)
except OSError as e:
if e.errno == errno.EEXIST:
pass
else:
raise
# NOTE(kiall): This is typicaly either permission denied while
# attempting to create the directory, or the directory
# already exists. Either way, don't fail.
pass

resource = obj_class.__name__.lower()
filename = "%s-%s-cache" % (resource, cache_type.replace('_', '-'))
Expand Down

0 comments on commit 10d226f

Please sign in to comment.