diff options
author | drngsl <drngsl@qq.com> | 2016-10-17 08:08:39 -0400 |
---|---|---|
committer | Liuqing Jing <jing.liuqing@99cloud.net> | 2017-01-18 14:20:21 +0000 |
commit | b7f52a8248cfa26b96d2151301f546085509dfef (patch) | |
tree | d81dfbf0d6ada5b0be5112e58b68958509f6b682 | |
parent | 93d09ebc06c16be71cc8ca231eab91a67f55fb63 (diff) | |
download | python-cinderclient-b7f52a8248cfa26b96d2151301f546085509dfef.tar.gz |
_human_id_cache or _uuid_cache error about completion_cache
cinderclient raises _human_id_cache or _uuid_cache exception
in method completion_cache. Error happend when launching many
api request with creating and list volumes on the client host.
Change-Id: I5c7de6fbb0a2d5106fca180ae6f940d6b738de93
Closes-Bug: #1634112
-rw-r--r-- | cinderclient/base.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cinderclient/base.py b/cinderclient/base.py index fd783f0..13f1f18 100644 --- a/cinderclient/base.py +++ b/cinderclient/base.py @@ -297,7 +297,12 @@ class Manager(common_base.HookableMixin): cache = getattr(self, cache_attr, None) if cache: cache.close() - delattr(self, cache_attr) + try: + delattr(self, cache_attr) + except AttributeError: + # NOTE(kiall): If this attr is deleted by another + # operation, don't fail any way. + pass def write_to_completion_cache(self, cache_type, val): cache = getattr(self, "_%s_cache" % cache_type, None) |