aboutsummaryrefslogtreecommitdiffstats
path: root/misc/python
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-23 03:29:45 +0000
committerlloyd <[email protected]>2006-08-23 03:29:45 +0000
commit593f9133a9ea1e9d2df82b27f4e199085b24c16f (patch)
treee9b56be3a5c08756c27685499b0ac2cb25a31a77 /misc/python
parentf1932b77306e2c1138ec99b312f2db80d0078079 (diff)
Remove import for the re module, which was not being used
Rename a function from throw_unless_ok to raise_unless_ok, as that's a bit more Pythonic
Diffstat (limited to 'misc/python')
-rwxr-xr-xmisc/python/nisttest.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/python/nisttest.py b/misc/python/nisttest.py
index 5ff6b2c5a..c070f76a9 100755
--- a/misc/python/nisttest.py
+++ b/misc/python/nisttest.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import sys, re, os, botan
+import sys, os, botan
from os.path import join;
class TestResult(Exception):
@@ -9,7 +9,7 @@ class TestResult(Exception):
def __str__(self):
return repr(self.result).replace('botan._botan.verify_result.', '')
-def throw_unless_ok(r):
+def raise_unless_ok(r):
if r != botan.verify_result.verified:
raise TestResult(r)
@@ -21,10 +21,10 @@ def validate(ca_certs, certs, crls, ee_certs):
store.add_cert(botan.X509_Certificate(cert), cert in ca_certs)
for crl in crls:
- throw_unless_ok(store.add_crl(botan.X509_CRL(crl)))
+ raise_unless_ok(store.add_crl(botan.X509_CRL(crl)))
for ee in ee_certs:
- throw_unless_ok(store.validate(botan.X509_Certificate(ee)))
+ raise_unless_ok(store.validate(botan.X509_Certificate(ee)))
raise TestResult(botan.verify_result.verified)