aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-03 22:10:22 -0500
committerJack Lloyd <[email protected]>2018-12-03 22:10:22 -0500
commite7efc94ddc8dda6101d38870b44e4bcda6371be1 (patch)
treeea63f920fd11f5eefcd9edcd567cf066b7af16ff /src/scripts
parentef57d0e4a4c53dd736edac2aca37125093d1e345 (diff)
Pylint fixes
Diffstat (limited to 'src/scripts')
-rwxr-xr-xsrc/scripts/bench.py2
-rwxr-xr-xsrc/scripts/dist.py2
-rwxr-xr-xsrc/scripts/install.py2
-rwxr-xr-xsrc/scripts/test_cli.py3
4 files changed, 4 insertions, 5 deletions
diff --git a/src/scripts/bench.py b/src/scripts/bench.py
index 13de0c077..1cc626366 100755
--- a/src/scripts/bench.py
+++ b/src/scripts/bench.py
@@ -129,7 +129,7 @@ def run_botan_bench(botan, runtime, buf_sizes, algo):
runtime = .05
cmd = [botan, 'speed', '--format=json', '--msec=%d' % int(runtime * 1000),
- '--buf-size=%s' % (','.join(map(str, buf_sizes))), algo]
+ '--buf-size=%s' % (','.join([str(i) for i in buf_sizes])), algo]
output = run_command(cmd)
output = json.loads(output)
diff --git a/src/scripts/dist.py b/src/scripts/dist.py
index a27784453..8a37a2581 100755
--- a/src/scripts/dist.py
+++ b/src/scripts/dist.py
@@ -311,7 +311,7 @@ def main(args=None):
try:
logging.info('Creating release for version %s' % (target_version))
- (major, minor, patch) = map(int, target_version.split('.'))
+ (major, minor, patch) = [int(x) for x in target_version.split('.')]
assert target_version == '%d.%d.%d' % (major, minor, patch)
target_version = target_version
diff --git a/src/scripts/install.py b/src/scripts/install.py
index 03a15ba3e..a539a8930 100755
--- a/src/scripts/install.py
+++ b/src/scripts/install.py
@@ -16,6 +16,7 @@ import os
import shutil
import sys
import subprocess
+import traceback
def parse_command_line(args):
@@ -269,6 +270,5 @@ if __name__ == '__main__':
sys.exit(main(sys.argv))
except Exception as e: # pylint: disable=broad-except
logging.error('Failure: %s' % (e))
- import traceback
logging.info(traceback.format_exc())
sys.exit(1)
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py
index 6445a3669..239c05175 100755
--- a/src/scripts/test_cli.py
+++ b/src/scripts/test_cli.py
@@ -42,7 +42,6 @@ def setup_logging(options):
def test_cli(cmd, cmd_options, expected_output=None, cmd_input=None, expected_stderr=None):
global TESTS_RUN
- global TESTS_FAILED
TESTS_RUN += 1
@@ -518,7 +517,7 @@ def cli_tls_socket_tests():
(stdout, stderr) = tls_client.communicate()
- if len(stderr) != 0: # pylint: disable=len-as-condition
+ if stderr:
logging.error("Got unexpected stderr output %s" % (stderr))
if b'Handshake complete' not in stdout: