Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Demo projects throw InvalidResultError instead of ValueError now.

  • Loading branch information...
commit 84d4f4c0a111b0e41108bad545f0f483eb05384c 1 parent 10c5ddc
@BasicWolf authored
View
1  demo/projects/hash_cracker/hash_cracker.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from hashlib import md5
from kaylee.project import Project, AUTO_PROJECT_MODE
+from kaylee.errors import InvalidResultError
class HashCrackerProject(Project):
mode = AUTO_PROJECT_MODE
View
3  demo/projects/human_ocr/human_ocr.py
@@ -7,6 +7,7 @@
from kaylee.project import Project, MANUAL_PROJECT_MODE
from kaylee.util import random_string
+from kaylee.errors import InvalidResultError
LIPSUM = "Lorem ipsum"
@@ -54,7 +55,7 @@ def __getitem__(self, task_id):
def normalize_result(self, task_id, result):
words = result['captcha'].split()
if words[1].lower() != result['#random_string'].lower():
- raise ValueError('Invalid control parameter value')
+ raise InvalidResultError('Invalid control parameter value')
return words[0]
def result_stored(self, task_id, result, storage):
Please sign in to comment.
Something went wrong with that request. Please try again.