diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-25 12:11:09 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-25 12:11:09 +0200 |
commit | 8e9f093a9d74da03eca85f6ff2ee7239e8133cce (patch) | |
tree | bd71d25a43df275e2e1f6c0e70cf20cc22f3a70a /module/PluginThread.py | |
parent | slightly improved process call (diff) | |
download | pyload-8e9f093a9d74da03eca85f6ff2ee7239e8133cce.tar.xz |
more cleanup
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r-- | module/PluginThread.py | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index ee5ebb0d5..0175bb419 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -140,6 +140,7 @@ class DownloadThread(PluginThread): self.m.log.info(_("Download aborted: %s") % pyfile.name) pyfile.setStatus("aborted") + pyfile.plugin.req.clean() self.active = False pyfile.release() continue @@ -172,6 +173,7 @@ class DownloadThread(PluginThread): self.m.log.warning(_("Download failed: %s | %s") % (pyfile.name, msg)) pyfile.error = msg + pyfile.plugin.req.clean() self.active = False pyfile.release() continue @@ -190,6 +192,7 @@ class DownloadThread(PluginThread): self.queue.put(pyfile) continue + pyfile.plugin.req.clean() self.active = False pyfile.release() continue @@ -203,6 +206,7 @@ class DownloadThread(PluginThread): print_exc() self.writeDebugReport(pyfile) + pyfile.plugin.req.clean() self.active = False pyfile.release() continue @@ -213,6 +217,7 @@ class DownloadThread(PluginThread): self.m.log.info(_("Download finished: %s") % pyfile.name) + pyfile.plugin.req.clean() self.m.core.hookManager.downloadFinished(pyfile) @@ -362,11 +367,15 @@ class InfoThread(PluginThread): for pluginname, urls in plugins.iteritems(): plugin = self.m.core.pluginManager.getPlugin(pluginname) if hasattr(plugin, "getInfo"): - self.m.core.log.debug("Run Info Fetching for %s" % pluginname) - for result in plugin.getInfo(urls): - if not type(result) == list: result = [result] - self.m.core.files.updateFileInfo(result, self.pid) - - self.m.core.log.debug("Finished Info Fetching for %s" % pluginname) - - self.m.core.files.save() + try: + self.m.core.log.debug("Run Info Fetching for %s" % pluginname) + for result in plugin.getInfo(urls): + if not type(result) == list: result = [result] + self.m.core.files.updateFileInfo(result, self.pid) + + self.m.core.log.debug("Finished Info Fetching for %s" % pluginname) + + self.m.core.files.save() + except Exception, e: + self.m.core.log.debug("Info Fetching for %s failed | %s" % (pluginname,str) ) +
\ No newline at end of file |