Misc tidy up for flake8 upgrade

Remove the upper bounds on flake8 for compatibility with
Ubuntu Focal.

Misc tidy of new lint as a result.

Change-Id: Ib6fb7955b4990e83634aae190145d8c463b6e226
This commit is contained in:
James Page 2020-06-03 12:00:36 +01:00
parent 41c4a8171e
commit 878f88f3cc
4 changed files with 7 additions and 6 deletions

View File

@ -243,8 +243,8 @@ def get_keystone_client(api_version):
auth_url=os.environ['OS_AUTH_URL'])
ksc_class = keystone_client.Client
os_cacert = os.environ.get('OS_CACERT', None)
if (os.environ['OS_AUTH_URL'].startswith('https') and
os_cacert is not None):
if (os.environ['OS_AUTH_URL'].startswith('https')
and os_cacert is not None):
ksc_vars['cacert'] = os_cacert
return ksc_class(**ksc_vars)
@ -471,7 +471,7 @@ class StatusExchange:
status_queue(self.conn.channel()).declare()
except:
except: # noqa
log.exception("Exception during kombu setup")
return False
@ -572,7 +572,7 @@ def main():
# not empty so we only match on this substring:
if 'endpoint for image' in e.message:
log.info("Glance endpoint not found, will continue polling.")
except Exception as e:
except Exception:
log.exception("Exception during syncing:")
status_exchange.send_message(
{"status": "Error", "message": traceback.format_exc()})

View File

@ -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)

View File

@ -111,5 +111,5 @@ commands =
functest-run-suite --keep-model --bundle {posargs}
[flake8]
ignore = E402,E226
ignore = E402,E226,W503
exclude = */charmhelpers

View File

@ -12,6 +12,7 @@ def _add_path(path):
if path not in sys.path:
sys.path.insert(1, path)
_add_path(_actions)
_add_path(_hooks)
_add_path(_charmhelpers)