summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-13 23:10:00 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-13 23:10:00 +0100
commit624b210b8b46e07826762a610dd2d6d7c0b4a121 (patch)
tree150365b9122caf0ed8287684416a1818d0153443 /pyLoadCore.py
parentcollector size (diff)
downloadpyload-624b210b8b46e07826762a610dd2d6d7c0b4a121.tar.xz
little SO fix
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py24
1 files changed, 8 insertions, 16 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 8aeb0a23b..5d11824d7 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -30,22 +30,14 @@ from imp import find_module
import logging
import logging.handlers
import os
-from os import _exit
-from os import execv
-from os import getcwd
-from os import makedirs
-from os import name as platform
-from os import remove
-from os import sep
+from os import _exit, execv, getcwd, makedirs, remove, sep
from os.path import exists, join
import signal
import subprocess
import sys
from sys import argv, executable, exit
-import time
-from time import sleep
+from time import time, sleep
from traceback import print_exc
-from xmlrpclib import Binary
from module import InitHomeDir
from module.plugins.AccountManager import AccountManager
@@ -481,7 +473,7 @@ class Core(object):
exit()
def isClientConnected(self):
- return (self.lastClientConnected + 30) > time.time()
+ return (self.lastClientConnected + 30) > time()
def restart(self):
self.shutdown()
@@ -756,28 +748,28 @@ class ServerMethods():
self.core.files.setPackageLocation(pid, dest)
def is_captcha_waiting(self):
- self.core.lastClientConnected = time.time()
+ self.core.lastClientConnected = time()
task = self.core.captchaManager.getTask()
return not task is None
def get_captcha_task(self, exclusive=False):
- self.core.lastClientConnected = time.time()
+ self.core.lastClientConnected = time()
task = self.core.captchaManager.getTask()
if task:
task.setWatingForUser(exclusive=exclusive)
c = task.getCaptcha()
- return str(task.id), Binary(c[0]), str(c[1])
+ return str(task.id), c[0], str(c[1])
else:
return None, None, None
def get_task_status(self, tid):
- self.core.lastClientConnected = time.time()
+ self.core.lastClientConnected = time()
t = self.core.captchaManager.getTaskFromID(tid)
if t:
return t.getStatus()
def set_captcha_result(self, tid, result):
- self.core.lastClientConnected = time.time()
+ self.core.lastClientConnected = time()
task = self.core.captchaManager.getTaskFromID(tid)
if task:
task.setResult(result)