summaryrefslogtreecommitdiff
path: root/lib/Crypto/SelfTest
diff options
context:
space:
mode:
authorRichard Mitchell <richard.j.mitchell@gmail.com>2014-04-29 14:55:26 +0100
committerDwayne Litzenberger <dlitz@dlitz.net>2014-06-22 20:16:05 -0700
commit9e171b794f102f5745076051202997df9eac254a (patch)
tree905358f99a2bb285083f1cf821abfc806b629349 /lib/Crypto/SelfTest
parentde67e51324fc7ecfb553046938b2f734e48ce9e7 (diff)
downloadpycrypto-9e171b794f102f5745076051202997df9eac254a.tar.gz
Get rid of catch-all exceptions. LP#1178485.
Diffstat (limited to 'lib/Crypto/SelfTest')
-rw-r--r--lib/Crypto/SelfTest/Signature/test_pkcs1_15.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Crypto/SelfTest/Signature/test_pkcs1_15.py b/lib/Crypto/SelfTest/Signature/test_pkcs1_15.py
index cc94262..c2d60f8 100644
--- a/lib/Crypto/SelfTest/Signature/test_pkcs1_15.py
+++ b/lib/Crypto/SelfTest/Signature/test_pkcs1_15.py
@@ -165,7 +165,7 @@ class PKCS1_15_Tests(unittest.TestCase):
# Data to sign can either be in hex form or not
try:
h.update(t2b(row[1]))
- except:
+ except ValueError:
h.update(b(row[1]))
# The real test
signer = PKCS.new(key)
@@ -186,7 +186,7 @@ class PKCS1_15_Tests(unittest.TestCase):
# Data to sign can either be in hex form or not
try:
h.update(t2b(row[1]))
- except:
+ except ValueError:
h.update(b(row[1]))
# The real test
verifier = PKCS.new(key)