diff options
author | 2015-05-12 02:17:30 +0200 | |
---|---|---|
committer | 2015-05-12 03:22:32 +0200 | |
commit | 000426c9d890ba2a71625a7454f9c573f10b9bae (patch) | |
tree | 8fa66da5061b850778f72f84038d9bb8bfa31f2f /pyload/datatype/File.py | |
parent | 'from os' -> 'import os' and so on... (diff) | |
download | pyload-000426c9d890ba2a71625a7454f9c573f10b9bae.tar.xz |
'from time' -> 'import time' and so on...
Diffstat (limited to 'pyload/datatype/File.py')
-rw-r--r-- | pyload/datatype/File.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pyload/datatype/File.py b/pyload/datatype/File.py index f46529d87..cb6989d98 100644 --- a/pyload/datatype/File.py +++ b/pyload/datatype/File.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- # @author: RaNaN, mkaay +import time import threading -from time import sleep, time - from pyload.manager.Event import UpdateEvent from pyload.utils import formatSize, lock @@ -61,7 +60,7 @@ class PyFile(object): self.plugin = None # self.download = None - self.waitUntil = 0 #: time() + time to wait + self.waitUntil = 0 #: time.time() + time to wait # status attributes self.active = False #: obsolete? @@ -189,7 +188,7 @@ class PyFile(object): self.abort = True if self.plugin and self.plugin.req: self.plugin.req.abortDownloads() - sleep(0.1) + time.sleep(0.1) self.abort = False if self.hasPlugin() and self.plugin.req: @@ -216,7 +215,7 @@ class PyFile(object): def formatWait(self): """ formats and return wait time in humanreadable format """ - seconds = self.waitUntil - time() + seconds = self.waitUntil - time.time() if seconds < 0: return "00:00:00" |