From 80ecab8f0c664bc43b9db10bee0cb815a96c1039 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 4 Jan 2015 20:20:34 +0100 Subject: Improve processCaptcha thread in hook plugins --- module/plugins/hooks/Captcha9kw.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hooks/Captcha9kw.py') diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py index 33ad00c49..6eb4ef305 100755 --- a/module/plugins/hooks/Captcha9kw.py +++ b/module/plugins/hooks/Captcha9kw.py @@ -5,19 +5,18 @@ from __future__ import with_statement import re from base64 import b64encode -from thread import start_new_thread from time import sleep from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getURL -from module.plugins.Hook import Hook +from module.plugins.Hook import Hook, threaded class Captcha9kw(Hook): __name__ = "Captcha9kw" __type__ = "hook" - __version__ = "0.26" + __version__ = "0.27" __config__ = [("activated" , "bool" , "Activated" , True ), ("ssl" , "bool" , "Use HTTPS" , True ), @@ -68,6 +67,7 @@ class Captcha9kw(Hook): return 0 + @threaded def _processCaptcha(self, task): try: with open(task.captchaFile, 'rb') as f: -- cgit v1.2.3