Permalink
Browse files

Cope if we don't have a picture for a CD

  • Loading branch information...
1 parent 821cba8 commit c66a95cfe85f22086bec0193d72b76db473b452f @palfrey committed Dec 25, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 amazon.py
View
@@ -29,7 +29,10 @@ def searchByTitle(artist, album):
ret["title"] = item.ItemAttributes.Title
ret["url"] = item.DetailPageURL
- ret["image"] = item.LargeImage.URL
+ if hasattr(item, "LargeImage"):
+ ret["image"] = item.LargeImage.URL
+ else:
+ ret["image"] = None
#ret["lowest_new"] = int(item.OfferSummary.LowestNewPrice.Amount)
ret["amazon_new"] = int(item.Offers.Offer.OfferListing.Price.Amount)
return ret

0 comments on commit c66a95c

Please sign in to comment.