summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-18 22:09:14 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-18 22:09:14 +0100
commitf559ab5186fb7bc122e39b1ceea96e25e78a5318 (patch)
tree5554e39535d8e1f432e1a5abc9f17c7190ff047f /module
parentclosed #153 (diff)
downloadpyload-f559ab5186fb7bc122e39b1ceea96e25e78a5318.tar.xz
little fixes
Diffstat (limited to 'module')
-rw-r--r--module/PluginThread.py7
-rw-r--r--module/plugins/captcha/captcha.py2
2 files changed, 7 insertions, 2 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index 20cb10a5b..6950ec8d7 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -213,8 +213,11 @@ class DownloadThread(PluginThread):
continue
except error, e:
- code, msg = e
-
+ try:
+ code, msg = e.args
+ except:
+ code = 0
+ msg = e.args
if code in (7, 18, 28, 52, 56):
self.m.log.warning(_("Couldn't connect to host or connection resetted waiting 1 minute and retry."))
diff --git a/module/plugins/captcha/captcha.py b/module/plugins/captcha/captcha.py
index 27c362f17..1da269dc6 100644
--- a/module/plugins/captcha/captcha.py
+++ b/module/plugins/captcha/captcha.py
@@ -56,6 +56,8 @@ class OCR(object):
popen = subprocess.Popen(command, bufsize = -1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
popen.wait()
+ output = popen.stdout.read() +" | "+ popen.stderr.read()
+ self.logger.debug("Tesseract ReturnCode %s Output: %s" % (popen.returncode, output))
def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True):
#self.logger.debug("create tmp tif")