summaryrefslogtreecommitdiffstats
path: root/pyload/Thread
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 14:03:56 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 14:03:56 +0200
commit304a42b914cde43a31a935181b0f952c726eee54 (patch)
tree104a496ed690c187a479cde5b829f4e76b21c1cd /pyload/Thread
parentOther import fixes (diff)
downloadpyload-304a42b914cde43a31a935181b0f952c726eee54.tar.xz
Other import fixes (2)
Diffstat (limited to 'pyload/Thread')
-rw-r--r--pyload/Thread/Addon.py3
-rw-r--r--pyload/Thread/Decrypter.py3
-rw-r--r--pyload/Thread/Download.py3
-rw-r--r--pyload/Thread/Info.py3
-rw-r--r--pyload/Thread/Plugin.py17
5 files changed, 8 insertions, 21 deletions
diff --git a/pyload/Thread/Addon.py b/pyload/Thread/Addon.py
index e28fafd29..24a2fc26a 100644
--- a/pyload/Thread/Addon.py
+++ b/pyload/Thread/Addon.py
@@ -8,9 +8,6 @@ import sys
import time
import traceback
-from pprint import pformat
-from types import MethodType
-
from pyload.Thread.Plugin import PluginThread
diff --git a/pyload/Thread/Decrypter.py b/pyload/Thread/Decrypter.py
index d4afac730..5a8cff7c1 100644
--- a/pyload/Thread/Decrypter.py
+++ b/pyload/Thread/Decrypter.py
@@ -7,9 +7,6 @@ import sys
import time
import traceback
-from pprint import pformat
-from types import MethodType
-
from pyload.Thread.Plugin import PluginThread
from pyload.plugin.Plugin import Abort, Fail, Retry
diff --git a/pyload/Thread/Download.py b/pyload/Thread/Download.py
index c20c7277e..49f6145ce 100644
--- a/pyload/Thread/Download.py
+++ b/pyload/Thread/Download.py
@@ -9,9 +9,6 @@ import traceback
import pycurl
-from pprint import pformat
-from types import MethodType
-
from pyload.Thread.Plugin import PluginThread
from pyload.plugin.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload
diff --git a/pyload/Thread/Info.py b/pyload/Thread/Info.py
index 780a384bb..cf76fda4b 100644
--- a/pyload/Thread/Info.py
+++ b/pyload/Thread/Info.py
@@ -7,9 +7,6 @@ import sys
import time
import traceback
-from pprint import pformat
-from types import MethodType
-
from pyload.Api import OnlineStatus
from pyload.Datatype import PyFile
from pyload.Thread.Plugin import PluginThread
diff --git a/pyload/Thread/Plugin.py b/pyload/Thread/Plugin.py
index ee1418a7d..cba82946d 100644
--- a/pyload/Thread/Plugin.py
+++ b/pyload/Thread/Plugin.py
@@ -9,9 +9,8 @@ import sys
import threading
import time
import traceback
-
-from pprint import pformat
-from types import MethodType
+import pprint
+import types
from pyload.Api import OnlineStatus
from pyload.Datatype import PyFile
@@ -87,7 +86,7 @@ class PluginThread(threading.Thread):
for key, value in frame.f_locals.items():
dump += "\t%20s = " % key
try:
- dump += pformat(value) + "\n"
+ dump += pprint.pformat(value) + "\n"
except Exception, e:
dump += "<ERROR WHILE PRINTING VALUE> " + str(e) + "\n"
@@ -99,10 +98,10 @@ class PluginThread(threading.Thread):
for name in dir(pyfile.plugin):
attr = getattr(pyfile.plugin, name)
- if not name.endswith("__") and type(attr) != MethodType:
+ if not name.endswith("__") and type(attr) != types.MethodType:
dump += "\t%20s = " % name
try:
- dump += pformat(attr) + "\n"
+ dump += pprint.pformat(attr) + "\n"
except Exception, e:
dump += "<ERROR WHILE PRINTING VALUE> " + str(e) + "\n"
@@ -110,16 +109,16 @@ class PluginThread(threading.Thread):
for name in dir(pyfile):
attr = getattr(pyfile, name)
- if not name.endswith("__") and type(attr) != MethodType:
+ if not name.endswith("__") and type(attr) != types.MethodType:
dump += "\t%20s = " % name
try:
- dump += pformat(attr) + "\n"
+ dump += pprint.pformat(attr) + "\n"
except Exception, e:
dump += "<ERROR WHILE PRINTING VALUE> " + str(e) + "\n"
if pyfile.pluginname in self.m.core.config.plugin:
dump += "\n\nCONFIG: \n\n"
- dump += pformat(self.m.core.config.plugin[pyfile.pluginname]) + "\n"
+ dump += pprint.pformat(self.m.core.config.plugin[pyfile.pluginname]) + "\n"
return dump