diff options
| -rw-r--r-- | cinderclient/apiclient/base.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cinderclient/apiclient/base.py b/cinderclient/apiclient/base.py index cdf06c8..3ae5dff 100644 --- a/cinderclient/apiclient/base.py +++ b/cinderclient/apiclient/base.py @@ -491,14 +491,13 @@ class Resource(RequestIdMixin): def _add_details(self, info): for (k, v) in info.items(): try: - try: - setattr(self, k, v) - except UnicodeEncodeError: - pass - self._info[k] = v + setattr(self, k, v) except AttributeError: # In this case we already defined the attribute on the class + continue + except UnicodeEncodeError: pass + self._info[k] = v def __getattr__(self, k): if k not in self.__dict__ or k not in self._info: |
