From 0de6e675bb0c5a4adb79d16df55ada3071825ad5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 22 Nov 2014 20:04:29 +0100 Subject: Revert remaining modules --- module/CaptchaManager.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'module/CaptchaManager.py') diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py index b7b81a5b7..02cd10a11 100644 --- a/module/CaptchaManager.py +++ b/module/CaptchaManager.py @@ -58,11 +58,11 @@ class CaptchaManager(): self.lock.release() return None - def handleCaptcha(self, task, timeout=50): + def handleCaptcha(self, task): cli = self.core.isClientConnected() if cli: #client connected -> should solve the captcha - task.setWaiting(timeout) #wait 50 sec for response + task.setWaiting(50) #wait 50 sec for response for plugin in self.core.hookManager.activePlugins(): try: @@ -125,10 +125,10 @@ class CaptchaTask(): self.status = "waiting" def isWaiting(self): - if self.result or self.error or self.timedOut(): + if self.result or self.error or time() > self.waitUntil: return False - else: - return True + + return True def isTextual(self): """ returns if text is written on the captcha """ @@ -149,12 +149,10 @@ class CaptchaTask(): def invalid(self): """ indicates the captcha was not correct """ - for x in self.handler: - x.captchaInvalid(self) + [x.captchaInvalid(self) for x in self.handler] def correct(self): - for x in self.handler: - x.captchaCorrect(self) + [x.captchaCorrect(self) for x in self.handler] def __str__(self): return "" % self.id -- cgit v1.2.3