summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/ExtractArchive.py8
-rw-r--r--module/plugins/hooks/IRCInterface.py4
-rw-r--r--module/plugins/hooks/MergeFiles.py5
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)