Permalink
Browse files

Merge pull request #327 from vajonam/nzbfix

fix nzb missing link issue
  • Loading branch information...
midgetspy committed Mar 11, 2012
2 parents edcb092 + 5c500d6 commit b13a4f0702476487294996c3475a22a5926e2e7d
Showing with 6 additions and 3 deletions.
  1. +6 −3 sickbeard/providers/generic.py
@@ -209,9 +209,12 @@ def _get_title_and_url(self, item):
Returns: A tuple containing two strings representing title and URL respectively
"""
title = helpers.get_xml_text(item.getElementsByTagName('title')[0])
- url = helpers.get_xml_text(item.getElementsByTagName('link')[0])
- if url:
- url = url.replace('&','&')
+ try:
+ url = helpers.get_xml_text(item.getElementsByTagName('link')[0])
+ if url:
+ url = url.replace('&','&')
+ except IndexError:
+ url = None
return (title, url)

0 comments on commit b13a4f0

Please sign in to comment.