summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/OCR.py
diff options
context:
space:
mode:
authorGravatar Jochen Oberreiter <joberreiter@users.noreply.github.com> 2015-09-26 18:24:29 +0200
committerGravatar Jochen Oberreiter <joberreiter@users.noreply.github.com> 2015-09-26 18:24:29 +0200
commit93a0c1d930520c055eae766b5dad305111a02c4d (patch)
tree8ac3f9e6dcf682775f5b170f2a9ca40eb7c0f8fc /module/plugins/internal/OCR.py
parentSpare plugin updates (diff)
parentMerge pull request #1850 from chaosblog/patch-2 (diff)
downloadpyload-93a0c1d930520c055eae766b5dad305111a02c4d.tar.xz
Merge pull request #1 from pyload/stable
Merge actual version
Diffstat (limited to 'module/plugins/internal/OCR.py')
-rw-r--r--module/plugins/internal/OCR.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/internal/OCR.py b/module/plugins/internal/OCR.py
index b24b3058b..3e5afae69 100644
--- a/module/plugins/internal/OCR.py
+++ b/module/plugins/internal/OCR.py
@@ -12,7 +12,6 @@ import logging
import os
import subprocess
# import tempfile
-import traceback
from module.plugins.internal.Plugin import Plugin
from module.utils import save_join as fs_join
@@ -128,6 +127,7 @@ class OCR(Plugin):
try:
with open(tmpTxt.name, 'r') as f:
self.result_captcha = f.read().replace("\n", "")
+
except Exception:
self.result_captcha = ""
@@ -137,10 +137,9 @@ class OCR(Plugin):
os.remove(tmpTxt.name)
if subset and (digits or lowercase or uppercase):
os.remove(tmpSub.name)
+
except OSError, e:
self.log_warning(e)
- if self.pyload.debug:
- traceback.print_exc()
def recognize(self, name):
@@ -194,6 +193,7 @@ class OCR(Plugin):
count += 1
if pixels[x, y - 1] != 255:
count += 1
+
except Exception:
pass