diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-05-26 15:36:51 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-05-26 15:36:51 +0200 |
commit | d02541c948a71533469663b3400bc4a3179548c2 (patch) | |
tree | 021232e6a2e0f05b99b21041e66ae1ccdc651ea5 /module/download_thread.py | |
parent | better youtube video id parsing, nicer testoutput (diff) | |
download | pyload-d02541c948a71533469663b3400bc4a3179548c2.tar.xz |
introduced logger
Diffstat (limited to 'module/download_thread.py')
-rw-r--r-- | module/download_thread.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/module/download_thread.py b/module/download_thread.py index 502d42ddc..96bc4dd34 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -83,13 +83,12 @@ class Download_Thread(threading.Thread): if self.parent.py_load_files: self.loadedPyFile = self.parent.get_job() if self.loadedPyFile: - try: + try: self.download(self.loadedPyFile) - except Exception, e: - print "Error:", e - #catch up all error here - finally: - self.parent.job_finished(self.loadedPyFile) + except Exception, e: + print "Error:", e #catch up all error here + finally: + self.parent.job_finished(self.loadedPyFile) sleep(0.5) if self.shutdown: sleep(1) @@ -99,9 +98,9 @@ class Download_Thread(threading.Thread): pyfile = py_load_file status = pyfile.status pyfile.prepareDownload() - - if not status.exists: - raise "FileDontExists" #i know its deprecated, who cares^^ + + if not status.exists: + raise "FileDontExists" #i know its deprecated, who cares^^ if status.want_reconnect: print "handle reconnect" @@ -112,7 +111,6 @@ class Download_Thread(threading.Thread): try: status.type = "downloading" - print "download", status.filename pyfile.plugin.proceed(status.url, pyfile.download_folder + "/" + status.filename) status.type = "finished" |