From ed3a162d5718700c8b2a2014f371d10a42fefc7e Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Tue, 8 Sep 2020 09:32:35 +0200 Subject: [PATCH] Unpin flake8, fix lint Change-Id: I0c3a4b4f8291e0b19d131269554e09346754e120 --- hooks/neutron_hooks.py | 6 +++--- hooks/neutron_utils.py | 2 +- test-requirements.txt | 2 +- tox.ini | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hooks/neutron_hooks.py b/hooks/neutron_hooks.py index 57ff2050..2644b314 100755 --- a/hooks/neutron_hooks.py +++ b/hooks/neutron_hooks.py @@ -24,10 +24,10 @@ from charmhelpers.core.host import ( is_container, lsb_release, ) -from charmhelpers.contrib.hahelpers.cluster import( +from charmhelpers.contrib.hahelpers.cluster import ( get_hacluster_config, ) -from charmhelpers.contrib.hahelpers.apache import( +from charmhelpers.contrib.hahelpers.apache import ( install_ca_cert ) from charmhelpers.contrib.openstack.utils import ( @@ -155,7 +155,7 @@ def config_changed(): for module in module_settings.split(): try: modprobe(module) - except: + except Exception: message = "Failed to load kernel module '%s'" % module log(message, level=WARNING) diff --git a/hooks/neutron_utils.py b/hooks/neutron_utils.py index 63d2cf27..9d6a1aab 100644 --- a/hooks/neutron_utils.py +++ b/hooks/neutron_utils.py @@ -1134,7 +1134,7 @@ def check_optional_relations(configs): if relation_ids('ha'): try: get_hacluster_config() - except: + except Exception: return ('blocked', 'hacluster missing configuration: ' 'vip, vip_iface, vip_cidr') diff --git a/test-requirements.txt b/test-requirements.txt index 7d9c2587..44b50231 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,7 +10,7 @@ charm-tools>=2.4.4 requests>=2.18.4 mock>=1.2 -flake8>=2.2.4,<=2.4.1 +flake8>=2.2.4 stestr>=2.2.0 coverage>=4.5.2 pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking) diff --git a/tox.ini b/tox.ini index b835733a..8080ba6d 100644 --- a/tox.ini +++ b/tox.ini @@ -116,5 +116,5 @@ commands = functest-run-suite --keep-model --bundle {posargs} [flake8] -ignore = E402,E226 +ignore = E402,E226,W504 exclude = */charmhelpers