aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/nist-sp-800-38a.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-09-25 06:11:11 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-09-25 06:11:11 +0300
commitcc050d010d398dbf5449d3885fe145c2f7f5c3b8 (patch)
treeef75f09b4ae9f513ce8308d9621f92bebffef516 /test/nist-sp-800-38a.py
parentfix licensing notices (diff)
downloadaes-tools-cc050d010d398dbf5449d3885fe145c2f7f5c3b8.tar.gz
aes-tools-cc050d010d398dbf5449d3885fe145c2f7f5c3b8.zip
test: add Pylint configuration + fix warnings
Diffstat (limited to 'test/nist-sp-800-38a.py')
-rw-r--r--test/nist-sp-800-38a.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/nist-sp-800-38a.py b/test/nist-sp-800-38a.py
index 300aa5b..024cfe6 100644
--- a/test/nist-sp-800-38a.py
+++ b/test/nist-sp-800-38a.py
@@ -8,9 +8,10 @@ from datetime import datetime
from enum import Enum
import logging
import os.path
+from subprocess import CalledProcessError
import sys
-from toolkit import *
+from toolkit import Algorithm, BlockInput, Mode, Tools
_TEST_PLAINTEXTS = [
'6bc1bee22e409f96e93d7e117393172a',
@@ -188,7 +189,7 @@ def run_encryption_test(tools, algorithm, mode, use_boxes=False):
return TestExitCode.SUCCESS
else:
return TestExitCode.FAILURE
- except Exception as e:
+ except CalledProcessError as e:
logging.error('Encountered an exception!')
logging.exception(e)
return TestExitCode.ERROR
@@ -209,7 +210,7 @@ def run_decryption_test(tools, algorithm, mode, use_boxes=False):
return TestExitCode.SUCCESS
else:
return TestExitCode.FAILURE
- except Exception as e:
+ except CalledProcessError as e:
logging.error('Encountered an exception!')
logging.exception(e)
return TestExitCode.ERROR