summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/internal/OCR.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-01 23:53:07 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-01 23:53:07 +0100
commit004a80bfaad38f9400e8aebcb8f980353a232295 (patch)
tree1e786d2d14a3040767aac237982544b74a9567cb /pyload/plugins/internal/OCR.py
parentFix previous merge (diff)
downloadpyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/plugins/internal/OCR.py')
-rw-r--r--pyload/plugins/internal/OCR.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyload/plugins/internal/OCR.py b/pyload/plugins/internal/OCR.py
index dec9f28b7..4d435d493 100644
--- a/pyload/plugins/internal/OCR.py
+++ b/pyload/plugins/internal/OCR.py
@@ -99,7 +99,7 @@ class OCR(object):
try:
with open(tmpTxt.name, 'r') as f:
self.result_captcha = f.read().replace("\n", "")
- except:
+ except Exception:
self.result_captcha = ""
self.logger.debug(self.result_captcha)
@@ -108,7 +108,7 @@ class OCR(object):
os.remove(tmpTxt.name)
if subset and (digits or lowercase or uppercase):
os.remove(tmpSub.name)
- except:
+ except Exception:
pass
@@ -163,7 +163,7 @@ class OCR(object):
count += 1
if pixels[x, y - 1] != 255:
count += 1
- except:
+ except Exception:
pass
# not enough neighbors are dark pixels so mark this pixel