bugfix in tv.py

This commit is contained in:
echel0n 2014-03-11 12:39:25 -07:00
parent 264f852a97
commit ff548a7f6b

View file

@ -716,11 +716,11 @@ class TVShow(object):
myEp = t[self.indexerid]
try:
if getattr(myEp, 'seriesname', None) is not None:
self.name = myEp["seriesname"].strip()
else:
raise indexer_exceptions.indexer_attributenotfound\
("Found %s, but attribute 'seriesname' was empty." % (self.indexerid))
self.name = myEp['seriesname'].strip()
except AttributeError:
raise indexer_exceptions.indexer_attributenotfound("Found %s, but attribute 'seriesname' was empty." % (self.indexerid))
self.classification = getattr(myEp, 'classification', 'Scripted')
self.genre = getattr(myEp, 'genre', '')