Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Give a bit more output on web service errors
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Aug 3, 2010
1 parent 83d81bc commit a203f36
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions missing_albums.py
Expand Up @@ -141,7 +141,13 @@ def getAlbums(artist):
q = ws.Query()

f = ws.ArtistFilter(name=artist, limit=5)
artistResults = q.getArtists(f)
while True:
try:
artistResults = q.getArtists(f)
break
except ws.WebServiceError, e:
print dir(e),e.msg, e.message
raise

#assert artistResults[0].artist.name == artist, (artistResults[0].artist.name,artist)
artist_id = artistResults[0].artist.id
Expand Down Expand Up @@ -171,7 +177,8 @@ def getAlbums(artist):
try:
release = q.getReleaseById(id, inc)
break
except ws.WebServiceError:
except ws.WebServiceError, e:
print dir(e),e.msg, e.message
sleep(2)
if release.asin == None: # ignore these
continue
Expand Down

0 comments on commit a203f36

Please sign in to comment.