diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-26 11:37:44 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-26 11:37:44 +0200 |
commit | e260b201f94a2a1e470b85a6499ea70e20a11277 (patch) | |
tree | 356dc9f5a7d8ef14cf6befb8cfa324b991571a0c /module/download_thread.py | |
parent | fixed occasionally appearing cli bug, catpcha method for sharebiz @ ~60% (diff) | |
download | pyload-e260b201f94a2a1e470b85a6499ea70e20a11277.tar.xz |
Cli stable, able to abort downloads, pause/kill server
Diffstat (limited to 'module/download_thread.py')
-rw-r--r-- | module/download_thread.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/download_thread.py b/module/download_thread.py index 202ebcafb..2c9cc8791 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -22,6 +22,7 @@ import traceback from time import sleep from time import time +from module.network.Request import AbortDownload class Status(object): """ Saves all status information @@ -53,7 +54,6 @@ class Status(object): class Reconnect(Exception): pass - class Download_Thread(threading.Thread): def __init__(self, parent): threading.Thread.__init__(self) @@ -70,6 +70,9 @@ class Download_Thread(threading.Thread): if self.loadedPyFile: try: self.download(self.loadedPyFile) + except AbortDownload: + self.loadedPyFile.plugin.req.abort = False + self.loadedPyFile.status.type = "aborted" except Reconnect: pass except Exception, e: |