diff options
Diffstat (limited to 'module/download_thread.py')
-rw-r--r-- | module/download_thread.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/module/download_thread.py b/module/download_thread.py index 80a1d4c30..62ac633ee 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -96,17 +96,17 @@ class Download_Thread(threading.Thread): def download(self, pyfile): status = pyfile.status pyfile.prepareDownload() - print "dl prepared", status.filename + print "dl prepared", status.filename - rnd = random.randint(0,2) - if rnd == 0: - print status.filename, "want reconnect" - status.want_reconnect = True - status.waituntil = time() + 60 - else: - status.waituntil = 0 - status.want_reconnect = False - print status.filename, "doesnt want reconnect" + rnd = random.randint(0,1) + if rnd == 0: + print status.filename, "want reconnect" + status.want_reconnect = True + status.waituntil = time() + 60 + else: + status.waituntil = 0 + status.want_reconnect = False + print status.filename, "doesnt want reconnect" if not status.exists: @@ -116,15 +116,15 @@ class Download_Thread(threading.Thread): reconnect = self.parent.init_reconnect() if reconnect: status.type = "reconnected" - status.want_reconnect = False + status.want_reconnect = False return False - status.type = "waiting" + status.type = "waiting" while (time() < status.waituntil): if status.want_reconnect and self.parent.reconnecting: status.type = "reconnected" - status.want_reconnect = False + status.want_reconnect = False return False sleep(1) |