From b57953d11d9e7a426920410c67ccd0e4d1a608d5 Mon Sep 17 00:00:00 2001 From: Patrick Vos Date: Fri, 22 Jun 2012 10:13:49 +0200 Subject: [PATCH] Fix log message causing list index out of range When no episodes are found, log the airdate. --- sickbeard/tv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index af0875390a..6d3b22821b 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -410,7 +410,7 @@ def makeEpFromFile(self, file): season = int(epObj["seasonnumber"]) episodes = [int(epObj["episodenumber"])] except tvdb_exceptions.tvdb_episodenotfound: - logger.log(u"Unable to find episode with date "+str(episodes[0])+" for show "+self.name+", skipping", logger.WARNING) + logger.log(u"Unable to find episode with date " + str(parse_result.air_date) + " for show " + self.name + ", skipping", logger.WARNING) return None except tvdb_exceptions.tvdb_error, e: logger.log(u"Unable to contact TVDB: "+ex(e), logger.WARNING)