diff options
| -rw-r--r-- | keystone/common/utils.py | 2 | ||||
| -rw-r--r-- | keystone/identity/backends/ldap/core.py | 5 | ||||
| -rw-r--r-- | tox.ini | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/keystone/common/utils.py b/keystone/common/utils.py index 9536cdc7..e35bde01 100644 --- a/keystone/common/utils.py +++ b/keystone/common/utils.py @@ -228,7 +228,7 @@ def setup_remote_pydev_debug(): stdoutToServer=True, stderrToServer=True) return True - except: + except Exception: LOG.exception(_( 'Error setting up the debug environment. Verify that the ' 'option --debug-url has the format <host>:<port> and that a ' diff --git a/keystone/identity/backends/ldap/core.py b/keystone/identity/backends/ldap/core.py index 87e560e0..f5cdc69a 100644 --- a/keystone/identity/backends/ldap/core.py +++ b/keystone/identity/backends/ldap/core.py @@ -855,10 +855,7 @@ class RoleApi(common_ldap.BaseLdap, ApiShimMixin): roles = conn.search_s(dn, ldap.SCOPE_ONELEVEL, query, ['%s' % '1.1']) for role_dn, _ in roles: - try: - conn.delete_s(role_dn) - except: - raise Exception + conn.delete_s(role_dn) except ldap.NO_SUCH_OBJECT: pass @@ -31,7 +31,6 @@ commands = {posargs} [flake8] show-source = true -# H201: no 'except:' at least use 'except Exception:' # H301: one import per line # H302: import only modules # H304: no relative imports. @@ -40,7 +39,7 @@ show-source = true # H402: one line docstring needs punctuation # H403: multi line docstring end on new line # H404: multi line docstring should start with a summary -ignore = H201,H301,H302,H304,H306,H401,H402,H403,H404 +ignore = H301,H302,H304,H306,H401,H402,H403,H404 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor |
