Skip to content

Commit

Permalink
lyricwiki: don't crash on key errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ronie committed Apr 22, 2012
1 parent 8d9f8ab commit 18b3596
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -26,7 +26,10 @@ def get_lyrics_thread(self, song):
response = req.read()
req.close()
data = simplejson.loads(response)
self.page = data['url']
try:
self.page = data['url']
except:
return None, __language__(30002) % (song.title, song.artist), __service__
if not self.page.endswith('action=edit'):
log( "%s: search url: %s" % (__service__, self.page))
req = urllib2.urlopen(self.page)
Expand Down

0 comments on commit 18b3596

Please sign in to comment.