No need to trap AttributeError, since cover will always exist

This commit is contained in:
sneakypete81 2013-09-14 12:19:43 +01:00
parent 8c96b22b44
commit 42b04b0c89

View file

@ -17,11 +17,8 @@ class Album(TroveboxObject):
def _update_fields_with_objects(self):
""" Convert dict fields into objects, where appropriate """
# Update the cover with a photo object
try:
if isinstance(self.cover, dict):
self.cover = Photo(self._client, self.cover)
except AttributeError:
pass # No cover
if isinstance(self.cover, dict):
self.cover = Photo(self._client, self.cover)
# Update the photo list with photo objects
try: