From 0cb3127482312a7f4928579a3963d019b952879d Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Wed, 21 Oct 2020 19:36:43 -0400 Subject: [PATCH] Fixed pylint warnings. --- src/ssh_audit/policy.py | 2 +- src/ssh_audit/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ssh_audit/policy.py b/src/ssh_audit/policy.py index 98f1291..c3a03be 100644 --- a/src/ssh_audit/policy.py +++ b/src/ssh_audit/policy.py @@ -29,7 +29,7 @@ from datetime import date from ssh_audit import exitcodes from ssh_audit.ssh2_kex import SSH2_Kex # pylint: disable=unused-import -from ssh_audit.banner import Banner +from ssh_audit.banner import Banner # pylint: disable=unused-import # Validates policy files and performs policy testing diff --git a/src/ssh_audit/utils.py b/src/ssh_audit/utils.py index 28434d6..7028b0e 100644 --- a/src/ssh_audit/utils.py +++ b/src/ssh_audit/utils.py @@ -118,14 +118,14 @@ class Utils: def parse_int(v: Any) -> int: try: return int(v) - except Exception: # pylint: disable=bare-except + except ValueError: return 0 @staticmethod def parse_float(v: Any) -> float: try: return float(v) - except Exception: # pylint: disable=bare-except + except ValueError: return -1.0 @staticmethod