diff options
Diffstat (limited to 'pyload/manager/thread')
-rw-r--r-- | pyload/manager/thread/Addon.py | 10 | ||||
-rw-r--r-- | pyload/manager/thread/Decrypter.py | 16 | ||||
-rw-r--r-- | pyload/manager/thread/Download.py | 22 | ||||
-rw-r--r-- | pyload/manager/thread/Info.py | 16 | ||||
-rw-r--r-- | pyload/manager/thread/Plugin.py | 14 |
5 files changed, 35 insertions, 43 deletions
diff --git a/pyload/manager/thread/Addon.py b/pyload/manager/thread/Addon.py index b176e4e0c..3cda99950 100644 --- a/pyload/manager/thread/Addon.py +++ b/pyload/manager/thread/Addon.py @@ -1,19 +1,17 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import traceback + from Queue import Queue -from threading import Thread +from copy import copy from os import listdir, stat from os.path import join -from time import sleep, time, strftime, gmtime -from traceback import print_exc, format_exc from pprint import pformat from sys import exc_info, exc_clear -from copy import copy +from time import sleep, time, strftime, gmtime from types import MethodType -from pycurl import error - from pyload.manager.thread.Plugin import PluginThread diff --git a/pyload/manager/thread/Decrypter.py b/pyload/manager/thread/Decrypter.py index 308e94f10..3554feac4 100644 --- a/pyload/manager/thread/Decrypter.py +++ b/pyload/manager/thread/Decrypter.py @@ -1,19 +1,17 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import traceback + from Queue import Queue -from threading import Thread +from copy import copy from os import listdir, stat from os.path import join -from time import sleep, time, strftime, gmtime -from traceback import print_exc, format_exc from pprint import pformat from sys import exc_info, exc_clear -from copy import copy +from time import sleep, time, strftime, gmtime from types import MethodType -from pycurl import error - from pyload.manager.thread.Plugin import PluginThread from pyload.plugin.Plugin import Abort, Fail, Retry @@ -67,7 +65,7 @@ class DecrypterThread(PluginThread): pyfile.error = msg if self.m.core.debug: - print_exc() + traceback.print_exc() return except Abort: @@ -75,7 +73,7 @@ class DecrypterThread(PluginThread): pyfile.setStatus("aborted") if self.m.core.debug: - print_exc() + traceback.print_exc() return except Retry: @@ -90,7 +88,7 @@ class DecrypterThread(PluginThread): pyfile.error = str(e) if self.m.core.debug: - print_exc() + traceback.print_exc() self.writeDebugReport(pyfile) return diff --git a/pyload/manager/thread/Download.py b/pyload/manager/thread/Download.py index 293014a2e..04f73b2ed 100644 --- a/pyload/manager/thread/Download.py +++ b/pyload/manager/thread/Download.py @@ -1,19 +1,19 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import traceback + +import pycurl + from Queue import Queue -from threading import Thread +from copy import copy from os import listdir, stat from os.path import join -from time import sleep, time, strftime, gmtime -from traceback import print_exc, format_exc from pprint import pformat from sys import exc_info, exc_clear -from copy import copy +from time import sleep, time, strftime, gmtime from types import MethodType -from pycurl import error - from pyload.manager.thread.Plugin import PluginThread from pyload.plugin.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload @@ -81,7 +81,7 @@ class DownloadThread(PluginThread): pyfile.setStatus("aborted") if self.m.core.debug: - print_exc() + traceback.print_exc() self.clean(pyfile) continue @@ -116,13 +116,13 @@ class DownloadThread(PluginThread): pyfile.error = msg if self.m.core.debug: - print_exc() + traceback.print_exc() self.m.core.addonManager.downloadFailed(pyfile) self.clean(pyfile) continue - except error, e: + except pycurl.error, e: if len(e.args) == 2: code, msg = e.args else: @@ -156,7 +156,7 @@ class DownloadThread(PluginThread): pyfile.setStatus("failed") self.m.core.log.error("pycurl error %s: %s" % (code, msg)) if self.m.core.debug: - print_exc() + traceback.print_exc() self.writeDebugReport(pyfile) self.m.core.addonManager.downloadFailed(pyfile) @@ -184,7 +184,7 @@ class DownloadThread(PluginThread): pyfile.error = str(e) if self.m.core.debug: - print_exc() + traceback.print_exc() self.writeDebugReport(pyfile) self.m.core.addonManager.downloadFailed(pyfile) diff --git a/pyload/manager/thread/Info.py b/pyload/manager/thread/Info.py index 9d8a3ef5b..856c8facf 100644 --- a/pyload/manager/thread/Info.py +++ b/pyload/manager/thread/Info.py @@ -1,22 +1,20 @@ # -*- coding: utf-8 -*- # @author: RaNaN +import traceback + from Queue import Queue -from threading import Thread +from copy import copy from os import listdir, stat from os.path import join -from time import sleep, time, strftime, gmtime -from traceback import print_exc, format_exc from pprint import pformat from sys import exc_info, exc_clear -from copy import copy +from time import sleep, time, strftime, gmtime from types import MethodType -from pycurl import error - +from pyload.api import OnlineStatus from pyload.datatype.File import PyFile from pyload.manager.thread.Plugin import PluginThread -from pyload.api import OnlineStatus class InfoThread(PluginThread): @@ -90,7 +88,7 @@ class InfoThread(PluginThread): try: data = self.decryptContainer(name, url) except Exception: - print_exc() + traceback.print_exc() self.m.log.error("Could not decrypt container.") data = [] @@ -182,7 +180,7 @@ class InfoThread(PluginThread): except Exception, e: self.m.log.warning(_("Info Fetching for %(name)s failed | %(err)s") % {"name": pluginname, "err": str(e)}) if self.m.core.debug: - print_exc() + traceback.print_exc() # generate default results if err: diff --git a/pyload/manager/thread/Plugin.py b/pyload/manager/thread/Plugin.py index d8319a2ce..2621bc861 100644 --- a/pyload/manager/thread/Plugin.py +++ b/pyload/manager/thread/Plugin.py @@ -3,24 +3,22 @@ from __future__ import with_statement +import traceback + from Queue import Queue -from threading import Thread +from copy import copy from os import listdir, stat from os.path import join -from time import sleep, time, strftime, gmtime -from traceback import print_exc, format_exc from pprint import pformat from sys import exc_info, exc_clear -from copy import copy +from time import sleep, time, strftime, gmtime from types import MethodType -from pycurl import error - +from pyload.api import OnlineStatus from pyload.datatype.File import PyFile from pyload.plugin.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload from pyload.utils.packagetools import parseNames from pyload.utils import fs_join -from pyload.api import OnlineStatus class PluginThread(Thread): @@ -74,7 +72,7 @@ class PluginThread(Thread): def getDebugDump(self, pyfile): dump = "pyLoad %s Debug Report of %s %s \n\nTRACEBACK:\n %s \n\nFRAMESTACK:\n" % ( - self.m.core.api.getServerVersion(), pyfile.pluginname, pyfile.plugin.__version, format_exc()) + self.m.core.api.getServerVersion(), pyfile.pluginname, pyfile.plugin.__version, traceback.format_exc()) tb = exc_info()[2] stack = [] |