From d02541c948a71533469663b3400bc4a3179548c2 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 26 May 2009 15:36:51 +0200 Subject: introduced logger --- module/download_thread.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'module/download_thread.py') 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" -- cgit v1.2.3