summaryrefslogtreecommitdiffstats
path: root/module/thread_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/thread_list.py')
-rw-r--r--module/thread_list.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/thread_list.py b/module/thread_list.py
index 3691c9f5e..778e2587d 100644
--- a/module/thread_list.py
+++ b/module/thread_list.py
@@ -108,6 +108,7 @@ class Thread_List(object):
elif pyfile.status.type == "reconnected":#put it back in queque
+ pyfile.plugin.req.init_curl()
self.list.files.insert(0, pyfile)
elif pyfile.status.type == "failed":
@@ -169,8 +170,11 @@ class Thread_List(object):
reconn = subprocess.Popen(self.parent.config['reconnect_method'])
reconn.wait()
time.sleep(1)
- ip = re.match(".*Current IP Address: (.*)</body>.*", urllib2.urlopen("http://checkip.dyndns.org/").read()).group(1) #versuchen neue ip aus zu lesen
+ ip = ""
while ip == "": #solange versuch bis neue ip ausgelesen
- ip = re.match(".*Current IP Address: (.*)</body>.*", urllib2.urlopen("http://checkip.dyndns.org/").read()).group(1)
+ try:
+ ip = re.match(".*Current IP Address: (.*)</body>.*", urllib2.urlopen("http://checkip.dyndns.org/").read()).group(1) #versuchen neue ip aus zu lesen
+ except:
+ ip = ""
time.sleep(1)
self.parent.logger.info("Reconnected, new IP: " + ip)