mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -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):
|
class DailySearchQueueItem(generic_queue.QueueItem):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.success = None
|
||||||
generic_queue.QueueItem.__init__(self, 'Daily Search', DAILY_SEARCH)
|
generic_queue.QueueItem.__init__(self, 'Daily Search', DAILY_SEARCH)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
@ -145,7 +146,7 @@ class DailySearchQueueItem(generic_queue.QueueItem):
|
|||||||
for result in foundResults:
|
for result in foundResults:
|
||||||
# just use the first result for now
|
# just use the first result for now
|
||||||
logger.log(u"Downloading " + result.name + " from " + result.provider.name)
|
logger.log(u"Downloading " + result.name + " from " + result.provider.name)
|
||||||
search.snatchEpisode(result)
|
self.success = search.snatchEpisode(result)
|
||||||
|
|
||||||
# give the CPU a break
|
# give the CPU a break
|
||||||
time.sleep(common.cpu_presets[sickbeard.CPU_PRESET])
|
time.sleep(common.cpu_presets[sickbeard.CPU_PRESET])
|
||||||
@ -154,6 +155,9 @@ class DailySearchQueueItem(generic_queue.QueueItem):
|
|||||||
except Exception:
|
except Exception:
|
||||||
logger.log(traceback.format_exc(), logger.DEBUG)
|
logger.log(traceback.format_exc(), logger.DEBUG)
|
||||||
|
|
||||||
|
if self.success is None:
|
||||||
|
self.success = False
|
||||||
|
|
||||||
self.finish()
|
self.finish()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user