mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 03:22:22 -05:00
Fix for no attr success
This commit is contained in:
parent
d28e9c63cc
commit
b0d550b3fb
@ -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)
|
||||
myList.append(item)
|
||||
|
Loading…
Reference in New Issue
Block a user