From 2f4d7d614171054c3c2b0b6185fa4ea465f5312f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 4 Nov 2014 01:09:43 +0100 Subject: Use more print_exc + code cosmetics --- module/PluginThread.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'module/PluginThread.py') diff --git a/module/PluginThread.py b/module/PluginThread.py index 6dc6a0fe1..59d2cabc9 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -207,6 +207,9 @@ class DownloadThread(PluginThread): pyfile.setStatus("aborted") + if self.m.core.debug: + print_exc() + self.clean(pyfile) continue @@ -239,6 +242,9 @@ class DownloadThread(PluginThread): self.m.log.warning(_("Download failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": msg}) pyfile.error = msg + if self.m.core.debug: + print_exc() + self.m.core.hookManager.downloadFailed(pyfile) self.clean(pyfile) continue @@ -380,11 +386,16 @@ class DecrypterThread(PluginThread): self.m.log.error(_("Decrypting failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": msg}) pyfile.error = msg + if self.m.core.debug: + print_exc() return except Abort: self.m.log.info(_("Download aborted: %s") % pyfile.name) pyfile.setStatus("aborted") + + if self.m.core.debug: + print_exc() return except Retry: -- cgit v1.2.3