From 1129b74e27c5baa4f4c03da9a06e8590c650a0ba Mon Sep 17 00:00:00 2001 From: micafer Date: Tue, 11 Oct 2022 17:22:05 +0200 Subject: [PATCH] Set ignores and excepts to flake8 --- monitoring/probeim.py | 4 ++-- tox.ini | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/monitoring/probeim.py b/monitoring/probeim.py index 30c4a907d..8bee3c714 100644 --- a/monitoring/probeim.py +++ b/monitoring/probeim.py @@ -424,8 +424,8 @@ def handler(signum, frame): # In case of errors if delete the infra if im and INF_ID: im.delete_infrastructure(INF_ID) - except Exception as ex: - logging.info("Initializing --------------") + except Exception: + logging.exception("Error deleting the infra.") msg = "%s: %s" % (rc_status_map[rc], msg) if mean_time > 0: diff --git a/tox.ini b/tox.ini index c6882bd28..347224215 100644 --- a/tox.ini +++ b/tox.ini @@ -25,4 +25,7 @@ commands = bash -c "nosetests -v test/unit/*.py test/unit/connectors/*.py -v --s commands = bandit IM -r -f html -o bandit.html -s B108,B601,B104 --severity-level medium [flake8] -max-line-length = 120 \ No newline at end of file +ignore = E402,E265 +max-line-length = 120 +exclude = doc,scripts +