From cbe4d60d401e4f2cedc38efb375ae38b40fb0c89 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 16 Aug 2009 17:29:36 +0200 Subject: reconnect-, uploaded.to fix --- module/thread_list.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'module/thread_list.py') 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: (.*).*", 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: (.*).*", urllib2.urlopen("http://checkip.dyndns.org/").read()).group(1) + try: + ip = re.match(".*Current IP Address: (.*).*", 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) -- cgit v1.2.3