summaryrefslogtreecommitdiffstats
path: root/module/CaptchaManager.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-05-01 20:02:26 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-05-01 20:02:26 +0200
commit93dd7baa519d15712e4c578b472e448502ec2298 (patch)
tree6980b0eb4432de2bdf72c6271bd736c6fc35e4ab /module/CaptchaManager.py
parentimport fix (diff)
downloadpyload-93dd7baa519d15712e4c578b472e448502ec2298.tar.xz
updated captcha manager
Diffstat (limited to 'module/CaptchaManager.py')
-rw-r--r--module/CaptchaManager.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py
index 9fbff92a1..d6a8fd077 100644
--- a/module/CaptchaManager.py
+++ b/module/CaptchaManager.py
@@ -41,7 +41,8 @@ class CaptchaManager():
def getTask(self):
self.lock.acquire()
for task in self.tasks:
- if task.getStatus() == "waiting":
+ status = task.getStatus()
+ if status == "waiting" or status == "shared-user":
self.lock.release()
return task
self.lock.release()
@@ -100,9 +101,12 @@ class CaptchaTask():
self.status = "waiting"
self.lock.release()
- def setWatingForUser(self):
+ def setWatingForUser(self, exclusive):
self.lock.acquire()
- self.status = "user"
+ if exclusive:
+ self.status = "user"
+ else:
+ self.status = "shared-user"
self.lock.release()
def removeTask(self):