summaryrefslogtreecommitdiffstats
path: root/pyload/Thread
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/Thread')
-rw-r--r--pyload/Thread/Addon.py2
-rw-r--r--pyload/Thread/Decrypter.py2
-rw-r--r--pyload/Thread/Download.py10
-rw-r--r--pyload/Thread/Info.py4
-rw-r--r--pyload/Thread/Plugin.py6
5 files changed, 12 insertions, 12 deletions
diff --git a/pyload/Thread/Addon.py b/pyload/Thread/Addon.py
index 49d470a8a..0b46345e8 100644
--- a/pyload/Thread/Addon.py
+++ b/pyload/Thread/Addon.py
@@ -2,13 +2,13 @@
# @author: RaNaN
import os
+import time
import traceback
from Queue import Queue
from copy import copy
from pprint import pformat
from sys import exc_info, exc_clear
-from time import sleep, time, strftime, gmtime
from types import MethodType
from pyload.Thread.Plugin import PluginThread
diff --git a/pyload/Thread/Decrypter.py b/pyload/Thread/Decrypter.py
index 62891433e..83403e8fa 100644
--- a/pyload/Thread/Decrypter.py
+++ b/pyload/Thread/Decrypter.py
@@ -2,13 +2,13 @@
# @author: RaNaN
import os
+import time
import traceback
from Queue import Queue
from copy import copy
from pprint import pformat
from sys import exc_info, exc_clear
-from time import sleep, time, strftime, gmtime
from types import MethodType
from pyload.Thread.Plugin import PluginThread
diff --git a/pyload/Thread/Download.py b/pyload/Thread/Download.py
index be9a1c7ef..d7a55ad24 100644
--- a/pyload/Thread/Download.py
+++ b/pyload/Thread/Download.py
@@ -2,6 +2,7 @@
# @author: RaNaN
import os
+import time
import traceback
import pycurl
@@ -10,7 +11,6 @@ from Queue import Queue
from copy import copy
from pprint import pformat
from sys import exc_info, exc_clear
-from time import sleep, time, strftime, gmtime
from types import MethodType
from pyload.Thread.Plugin import PluginThread
@@ -90,7 +90,7 @@ class DownloadThread(PluginThread):
# pyfile.req.clearCookies()
while self.m.reconnecting.isSet():
- sleep(0.5)
+ time.sleep(0.5)
continue
@@ -132,12 +132,12 @@ class DownloadThread(PluginThread):
if code in (7, 18, 28, 52, 56):
self.m.core.log.warning(_("Couldn't connect to host or connection reset, waiting 1 minute and retry."))
- wait = time() + 60
+ wait = time.time() + 60
pyfile.waitUntil = wait
pyfile.setStatus("waiting")
- while time() < wait:
- sleep(1)
+ while time.time() < wait:
+ time.sleep(1)
if pyfile.abort:
break
diff --git a/pyload/Thread/Info.py b/pyload/Thread/Info.py
index fbd60908e..09b562659 100644
--- a/pyload/Thread/Info.py
+++ b/pyload/Thread/Info.py
@@ -2,13 +2,13 @@
# @author: RaNaN
import os
+import time
import traceback
from Queue import Queue
from copy import copy
from pprint import pformat
from sys import exc_info, exc_clear
-from time import sleep, time, strftime, gmtime
from types import MethodType
from pyload.api import OnlineStatus
@@ -116,7 +116,7 @@ class InfoThread(PluginThread):
self.m.infoResults[self.rid]['ALL_INFO_FETCHED'] = {}
- self.m.timestamp = time() + 5 * 60
+ self.m.timestamp = time.time() + 5 * 60
def updateDB(self, plugin, result):
diff --git a/pyload/Thread/Plugin.py b/pyload/Thread/Plugin.py
index 264deb84c..9d61c9a12 100644
--- a/pyload/Thread/Plugin.py
+++ b/pyload/Thread/Plugin.py
@@ -5,13 +5,13 @@ from __future__ import with_statement
import os
import threading
+import time
import traceback
from Queue import Queue
from copy import copy
from pprint import pformat
from sys import exc_info, exc_clear
-from time import sleep, time, strftime, gmtime
from types import MethodType
from pyload.api import OnlineStatus
@@ -36,7 +36,7 @@ class PluginThread(threading.Thread):
:return:
"""
- dump_name = "debug_%s_%s.zip" % (pyfile.pluginname, strftime("%d-%m-%Y_%H-%M-%S"))
+ dump_name = "debug_%s_%s.zip" % (pyfile.pluginname, time.strftime("%d-%m-%Y_%H-%M-%S"))
dump = self.getDebugDump(pyfile)
try:
@@ -51,7 +51,7 @@ class PluginThread(threading.Thread):
except Exception:
pass
- info = zipfile.ZipInfo(fs_join(pyfile.pluginname, "debug_Report.txt"), gmtime())
+ info = zipfile.ZipInfo(fs_join(pyfile.pluginname, "debug_Report.txt"), time.gmtime())
info.external_attr = 0644 << 16L #: change permissions
zip.writestr(info, dump)