summaryrefslogtreecommitdiffstats
path: root/module/CaptchaManager.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/CaptchaManager.py')
-rw-r--r--module/CaptchaManager.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py
index 539e80744..02cd10a11 100644
--- a/module/CaptchaManager.py
+++ b/module/CaptchaManager.py
@@ -99,9 +99,9 @@ class CaptchaTask():
return self.captchaImg, self.captchaFormat, self.captchaResultType
def setResult(self, text):
- if self.captchaResultType == 'textual':
+ if self.isTextual():
self.result = text
- if self.captchaResultType == 'positional':
+ if self.isPositional():
try:
parts = text.split(',')
self.result = (int(parts[0]), int(parts[1]))
@@ -130,6 +130,14 @@ class CaptchaTask():
return True
+ def isTextual(self):
+ """ returns if text is written on the captcha """
+ return self.captchaResultType == 'textual'
+
+ def isPositional(self):
+ """ returns if user have to click a specific region on the captcha """
+ return self.captchaResultType == 'positional'
+
def setWatingForUser(self, exclusive):
if exclusive:
self.status = "user"