Enable H201 - don't throw bare exceptions
I agree - bare except is bad - it can cause ctrl-c to stop working, which is totally evil. (I mean, unless that is the intent, in which case it's the right thing to do. None of these cases are cases when we desire ctrl-c to stop working) Change-Id: Ieffa26e8da77199c9ef7238a6c9f0704fc581ba6
This commit is contained in:
parent
fe130c620b
commit
7ac3c03212
|
@ -7044,7 +7044,7 @@ class OpenStackCloud(_normalize.Normalizer):
|
|||
return self.manager.submit_task(_tasks.RecordSetGet(
|
||||
zone=zone,
|
||||
recordset=name_or_id))
|
||||
except:
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def search_recordsets(self, zone, name_or_id=None, filters=None):
|
||||
|
|
|
@ -241,7 +241,7 @@ class OperatorCloud(openstackcloud.OpenStackCloud):
|
|||
self.manager.submit_task(
|
||||
_tasks.MachinePortDelete(
|
||||
port_id=uuid))
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
finally:
|
||||
self.manager.submit_task(
|
||||
|
|
|
@ -104,7 +104,7 @@ class TestClusterTemplate(base.BaseFunctionalTestCase):
|
|||
if self.ct:
|
||||
try:
|
||||
self.user_cloud.delete_cluster_template(self.ct['name'])
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# delete keypair
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -69,7 +69,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
|||
[flake8]
|
||||
# The string of H ignores is because there are some useful checks
|
||||
# related to python3 compat.
|
||||
ignore = H3,H4,H5,H6,H7,H8,H103,H201
|
||||
ignore = H3,H4,H5,H6,H7,H8,H103
|
||||
show-source = True
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
|
|
Loading…
Reference in New Issue