diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-07 22:08:58 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-07 22:08:58 +0200 |
commit | c99421d6385e0f6b8bd9095c705becbc35f873a0 (patch) | |
tree | 40cbfeb2ac5042660c3aef5e86b95f8437f1a5d2 /module/plugins/hooks | |
parent | [YadiSk] Fix https://github.com/pyload/pyload/issues/1321 (diff) | |
download | pyload-c99421d6385e0f6b8bd9095c705becbc35f873a0.tar.xz |
Traceback code cosmetics
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 8 | ||||
-rw-r--r-- | module/plugins/hooks/IRCInterface.py | 4 | ||||
-rw-r--r-- | module/plugins/hooks/MergeFiles.py | 5 |
3 files changed, 8 insertions, 9 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 2f981d06b..595512c12 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -4,9 +4,9 @@ from __future__ import with_statement import os import sys +import traceback from copy import copy -from traceback import print_exc # monkey patch bug in python 2.6 and lower # http://bugs.python.org/issue6122 , http://bugs.python.org/issue1236 , http://bugs.python.org/issue1731717 @@ -177,12 +177,12 @@ class ExtractArchive(Hook): else: self.logWarning(_("Could not activate: %s") % p, e) if self.core.debug: - print_exc() + traceback.print_exc() except Exception, e: self.logWarning(_("Could not activate: %s") % p, e) if self.core.debug: - print_exc() + traceback.print_exc() if self.extractors: self.logInfo(_("Activated") + " " + "|".join("%s %s" % (Extractor.__name__, Extractor.VERSION) for Extractor in self.extractors)) @@ -497,7 +497,7 @@ class ExtractArchive(Hook): except Exception, e: self.logError(name, _("Unknown error"), e) if self.core.debug: - print_exc() + traceback.print_exc() self.manager.dispatchEvent("archive_extract_failed", pyfile, archive) diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index d76b9cb85..9e2f670e6 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -4,11 +4,11 @@ import re import socket import ssl import time +import traceback from pycurl import FORM_FILE from select import select from threading import Thread -from traceback import print_exc from module.Api import PackageDoesNotExists, FileDoesNotExists from module.network.RequestFactory import getURL @@ -106,7 +106,7 @@ class IRCInterface(Thread, Hook): except IRCError, ex: self.sock.send("QUIT :byebye\r\n") - print_exc() + traceback.print_exc() self.sock.close() diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py index 2900b0d29..941938920 100644 --- a/module/plugins/hooks/MergeFiles.py +++ b/module/plugins/hooks/MergeFiles.py @@ -4,8 +4,7 @@ from __future__ import with_statement import os import re - -from traceback import print_exc +import traceback from module.plugins.Hook import Hook, threaded from module.utils import save_join @@ -75,7 +74,7 @@ class MergeFiles(Hook): self.logDebug("Finished merging part", splitted_file) except Exception, e: - print_exc() + traceback.print_exc() finally: pyfile.setProgress(100) |