summaryrefslogtreecommitdiffstats
path: root/module/PluginThread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-07-29 17:05:45 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-07-29 17:05:45 +0200
commit252cf9964a2ebc78a589f75db2a7be0d25cac512 (patch)
tree0f4cd1a7949f8a3dc87eaed35f248170ee421943 /module/PluginThread.py
parentmany new stuff, some things already working (diff)
downloadpyload-252cf9964a2ebc78a589f75db2a7be0d25cac512.tar.xz
more improvements and cleaned some imports
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r--module/PluginThread.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index 75b643408..313183cca 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -36,7 +36,7 @@ class PluginThread(Thread):
"""Constructor"""
Thread.__init__(self)
self.setDaemon(True)
- self.m = manager
+ self.m = manager #thread manager
########################################################################
@@ -64,7 +64,7 @@ class DownloadThread(PluginThread):
if self.active == "quit":
return True
- print pyfile
+ self.m.log.info(_("starting %s" % pyfile.name))
try:
pyfile.plugin.preprocessing(self)
@@ -105,7 +105,7 @@ class DownloadThread(PluginThread):
self.m.log.warning(_("%s is offline.") % pyfile.name)
else:
pyfile.setStatus("failed")
- self.m.log.warning(_("%s failed with message: %s") % (pyfile.name, msg))
+ self.m.log.warning(_("%s failed: %s") % (pyfile.name, msg))
pyfile.error = msg
continue
@@ -115,9 +115,9 @@ class DownloadThread(PluginThread):
print "pycurl error", code, msg
continue
- except Exception,e :
+ except Exception, e:
pyfile.setStatus("failed")
- self.m.log.error(_("%s failed with message: .") % (pyfile.name, str(e)))
+ self.m.log.error(_("%s failed: %s") % (pyfile.name, str(e)))
if self.m.core.debug:
print_exc()
@@ -126,16 +126,17 @@ class DownloadThread(PluginThread):
finally:
- print "saved"
self.m.core.files.save()
- print "finished successfully"
+
+ self.m.log(_("%s finished") % pyfile.name)
#@TODO hooks, packagaefinished etc
self.active = False
pyfile.finishIfDone()
+ self.m.core.files.save()
#----------------------------------------------------------------------
def put(self, job):