summaryrefslogtreecommitdiffstats
path: root/module/plugins/captcha
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:14:50 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:14:50 +0100
commite1baccf1ec914563d3b2b845906cce024e7cd3b1 (patch)
tree7113e8923ea58112787ce93d5ab9d98e277926c9 /module/plugins/captcha
parent[SimpleCrypter] Better account retrieving (diff)
downloadpyload-e1baccf1ec914563d3b2b845906cce024e7cd3b1.tar.xz
Replace 'except' with 'except Exception'
Diffstat (limited to 'module/plugins/captcha')
-rw-r--r--module/plugins/captcha/LinksaveIn.py2
-rw-r--r--module/plugins/captcha/captcha.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/captcha/LinksaveIn.py b/module/plugins/captcha/LinksaveIn.py
index 56cbd58a0..de6b0e7ff 100644
--- a/module/plugins/captcha/LinksaveIn.py
+++ b/module/plugins/captcha/LinksaveIn.py
@@ -79,7 +79,7 @@ class LinksaveIn(OCR):
rgb_c = lut[pix[x, y]]
try:
cstat[rgb_c] += 1
- except:
+ except Exception:
cstat[rgb_c] = 1
if rgb_bg == rgb_c:
stat[bgpath] += 1
diff --git a/module/plugins/captcha/captcha.py b/module/plugins/captcha/captcha.py
index 0f233ec00..e89ec2e81 100644
--- a/module/plugins/captcha/captcha.py
+++ b/module/plugins/captcha/captcha.py
@@ -102,7 +102,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)
@@ -111,7 +111,7 @@ class OCR(object):
os.remove(tmpTxt.name)
if subset and (digits or lowercase or uppercase):
os.remove(tmpSub.name)
- except:
+ except Exception:
pass
@@ -166,7 +166,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