mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Fix for no attr success
This commit is contained in:
parent
d28e9c63cc
commit
b0d550b3fb
1 changed files with 6 additions and 2 deletions
|
@ -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 a new issue