From 000426c9d890ba2a71625a7454f9c573f10b9bae Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 12 May 2015 02:17:30 +0200 Subject: 'from time' -> 'import time' and so on... --- pyload/datatype/File.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pyload/datatype/File.py') 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" -- cgit v1.2.3