From b0d550b3fbb58ecdee6ae3733d4ab593de13ca96 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 21 Sep 2014 13:42:01 -0700 Subject: [PATCH] Fix for no attr success --- sickbeard/search_queue.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sickbeard/search_queue.py b/sickbeard/search_queue.py index 62aa6589..564e4f8b 100644 --- a/sickbeard/search_queue.py +++ b/sickbeard/search_queue.py @@ -130,6 +130,7 @@ class SearchQueue(generic_queue.GenericQueue): class DailySearchQueueItem(generic_queue.QueueItem): def __init__(self): + self.success = None generic_queue.QueueItem.__init__(self, 'Daily Search', DAILY_SEARCH) def run(self): @@ -145,7 +146,7 @@ class DailySearchQueueItem(generic_queue.QueueItem): for result in foundResults: # just use the first result for now logger.log(u"Downloading " + result.name + " from " + result.provider.name) - search.snatchEpisode(result) + self.success = search.snatchEpisode(result) # give the CPU a break time.sleep(common.cpu_presets[sickbeard.CPU_PRESET]) @@ -154,6 +155,9 @@ class DailySearchQueueItem(generic_queue.QueueItem): except Exception: logger.log(traceback.format_exc(), logger.DEBUG) + if self.success is None: + self.success = False + self.finish() @@ -290,4 +294,4 @@ class FailedQueueItem(generic_queue.QueueItem): def fifo(myList, item, maxSize = 100): if len(myList) >= maxSize: myList.pop(0) - myList.append(item) \ No newline at end of file + myList.append(item)