mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-04 16:35:00 -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()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user