diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-08-16 17:29:36 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-08-16 17:29:36 +0200 |
commit | cbe4d60d401e4f2cedc38efb375ae38b40fb0c89 (patch) | |
tree | fb8cb7befb09b55d738ab483025f627eb3f0059d /module/thread_list.py | |
parent | fixed little bugs (diff) | |
download | pyload-cbe4d60d401e4f2cedc38efb375ae38b40fb0c89.tar.xz |
reconnect-, uploaded.to fix
Diffstat (limited to 'module/thread_list.py')
-rw-r--r-- | module/thread_list.py | 8 |
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) |