Fixes H201: no 'except:' at least use 'except Exception:'

Enabled H201 on tox and changes made in relevant files.

Change-Id: I7e1f05d9f90b11ac89b371e66ed9a0010462ad01
This commit is contained in:
Paula Madalina Crismaru 2016-07-29 10:18:48 +03:00
parent b0a1d014e4
commit 57e10bbcb7
2 changed files with 2 additions and 3 deletions

View File

@ -73,7 +73,7 @@ class Persister(object):
if len(self._data_points) >= self._database_batch_size:
self._flush()
except:
except Exception:
LOG.exception(
'Persister encountered fatal exception processing '
'messages. '

View File

@ -26,8 +26,7 @@ commands = {posargs}
[flake8]
max-line-length = 120
# TODO: ignored checks should be enabled in the future
# H201 no 'except:' at least use 'except Exception:'
# H405 multi line docstring summary not separated with an empty line
# H904 Wrap long lines in parentheses instead of a backslash
ignore = F821,H201,H405,H904,E126,E125,H306,E302,E122
ignore = F821,H405,H904,E126,E125,H306,E302,E122
exclude=.venv,.git,.tox,dist,*openstack/common*,*egg,build