summaryrefslogtreecommitdiffstats
path: root/module/thread_list.py
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-07-29 18:35:05 +0200
committerGravatar spoob <spoob@gmx.de> 2009-07-29 18:35:05 +0200
commita16c0d4327e18c91ad80e7da635a9bac72c87829 (patch)
treeefce47d8cf529351d856aa10083bf4aa95b59f57 /module/thread_list.py
parentfixed file not found bug (diff)
downloadpyload-a16c0d4327e18c91ad80e7da635a9bac72c87829.tar.xz
fixed bug if reconnect method not found
Diffstat (limited to 'module/thread_list.py')
-rw-r--r--module/thread_list.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/module/thread_list.py b/module/thread_list.py
index 52b264648..a359558d7 100644
--- a/module/thread_list.py
+++ b/module/thread_list.py
@@ -22,6 +22,7 @@ import re
import subprocess
import time
import urllib2
+from os.path import exists
from threading import RLock
from download_thread import Download_Thread
@@ -56,7 +57,6 @@ class Thread_List(object):
while len(self.threads) < self.max_threads:
self.create_thread()
-
def get_job(self):
"""return job if suitable, otherwise send thread idle"""
@@ -121,10 +121,12 @@ class Thread_List(object):
def init_reconnect(self):
"""initialise a reonnect"""
- if not self.parent.config['use_reconnect']:
+ if not self.parent.config['use_reconnect'] or self.reconnecting:
return False
- if self.reconnecting:
+ if not exists(self.parent.config['reconnect_method']):
+ self.parent.logger.info(self.parent.config['reconnect_method'] + " not found")
+ self.parent.config['use_reconnect'] = False
return False
self.lock.acquire()