Merge "Minor refactoring for nested try-block"

This commit is contained in:
Jenkins
2016-12-23 18:59:17 +00:00
committed by Gerrit Code Review

View File

@@ -490,15 +490,14 @@ class Resource(RequestIdMixin):
def _add_details(self, info):
for (k, v) in info.items():
try:
try:
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
except AttributeError:
# In this case we already defined the attribute on the class
pass
def __getattr__(self, k):
if k not in self.__dict__ or k not in self._info: