Skip to content

Commit

Permalink
add another try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardslabs committed Apr 12, 2015
1 parent 543a4c3 commit 1b78050
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/tvdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ def get_episodes_for_series(series_name, api_key):
series = etree.fromstring(_request.content, parser=parser)
try:
series_name = series.xpath('//SeriesName/text()')[0]
except:
series_name = series.xpath('//SeriesName/text()')
try:
if series.xpath('//Status/text()')[0] == 'Ended':
res["ended"] = True
except:
series_name = series.xpath('//SeriesName/text()')
if series.xpath('//Status/text()') == 'Ended':
res["ended"] = True

Expand Down

0 comments on commit 1b78050

Please sign in to comment.